PROJOT                 package:PTAk                 R Documentation

_O_r_t_h_o_g_o_n_a_l _T_e_n_s_o_r _p_r_o_j_e_c_t_i_o_n

_D_e_s_c_r_i_p_t_i_o_n:

     Orthogonal-tensoriel projection of a tensor according to a rank-1
     tensor, or a to bigger structure defined by kronecker product of
     matrices.

_U_s_a_g_e:

      PROJOT(X,solu,numo=1,bortho=TRUE,Ortho=TRUE,metrics=NULL)

_A_r_g_u_m_e_n_t_s:

       X: a tensor(as an array) of any order 

    solu: an object like a `solutions.PTAk' object with at least `v'

    numo: a vector of numbers  or a list of vectors  (length the order
          of the tensor) identifying for each space the structure to
          project onto, if NULL for a specific space then no projection
          is done for this space

  bortho: list of logicals saying if the structures are othogonal or
          not.

   Ortho: list of logicals telling the projectors on each space to be 
          on the structure  or on its orthogonal.

 metrics: NULL or list of metrics (either diagonal or not) for each
          entry of `X'

_D_e_t_a_i_l_s:

     This function computes the tensorial orthogonal projection of `X'
     onto the tensorial structure defined by `solu' and `numo'. For
     each space (involved in the tensorial product where from  `X'
     belongs), one defined the projector onto `solu[[i]][["v"]][numo,]'
     (or on its orthogonal if `Ortho[[i]]==TRUE'), then the result is
     the image of `X' by the tensorial product of the projectors, i.e.

          (P_{S1} otimes P_{S2} otimes ... otimes P_{Sk})(X)

     .

_V_a_l_u_e:

     A tensor with dimensions as `X'

_N_o_t_e:

     For PTA-kmodes the projection used is only on rank-one tensors
     (Principal Tensors), i.e. `numo' is a number. The code here can be
     used for any structure (on each spaces) and constitutes the
     projector onto a tensorial structure, and can define the
     PTAIV-kmodes (PTAk on Instrumental Variables Leibovici(1993). (see
     other references  for tensorial product of linear operators in
     Leibovici(2000) e.g. Dauxois et al.(1994))

_A_u_t_h_o_r(_s):

     Didier Leibovici didier@fmrib.ox.ac.uk

_R_e_f_e_r_e_n_c_e_s:

     Leibovici D (1993) Facteurs  Mesures Rptes et Analyses
     Factorielles : applications  un suivi pidmiologique. Universit
     de Montpellier II PhD Thesis in Mathmatiques et Applications
     (Biostatistiques).

     Leibovici D (2000) Multiway Multidimensional Analysis for
     Pharmaco-EEG Studies.(submitted) <URL:
     http://www.fmrib.ox.ac.uk/~didier/cv/recentpub.html>

_S_e_e _A_l_s_o:

     `PTAk'

_E_x_a_m_p_l_e_s:

     don <- array(1:360,c(5,4,6,3))
      don <- don + rnorm(360,10,2)

      ones <- list(list(v=rep(1,5)),list(v=rep(1,4)),list(v=rep(1,6)),list(v=rep(1,3)))
      donfc <- PROJOT(don,ones)

      apply(donfc,c(2,3,4),mean)
     apply(donfc,c(1),mean)

       # implementation de PTAIVk with obvious settings
      PTAIVk <- function(X,STruct,...)
              {X <- PROJOT(X$data,STruct,numo=Struct[[1]]$numo,Ortho=Struct[[1]]$Ortho,metrics=X$met)
              PTAk(X,...)
              }



