PROJOT {PTAk} | R Documentation |
Orthogonal-tensoriel projection of a tensor according to a rank-1 tensor, or a to bigger structure defined by kronecker product of matrices.
PROJOT(X,solu,numo=1,bortho=TRUE,Ortho=TRUE,metrics=NULL)
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 |
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)
.
A tensor with dimensions as X
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))
Didier Leibovici c3s2i@free.fr
Leibovici D (1993) Facteurs à Mesures Répétées et Analyses Factorielles : applications à un suivi épidémiologique. Université de Montpellier II PhD Thesis in Mathématiques et Applications (Biostatistiques).
Leibovici D (2000) Multiway Multidimensional Analysis for Pharmaco-EEG Studies.(submitted) http://c3s2i.free.fr/cv/recentpub.html
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,...) }