blockProj: Compute the partial projections for blocks in 3-way...

View source: R/CSCA.R

blockProjR Documentation

Compute the partial projections for blocks in 3-way Correspondence Analysis (as in block-PTCA)

Description

blockProj: Computes the partial projections for blocks in 3-way Correspondence Analysis (e.g., as in block-PTCA). Compute the projection for blocks on one set (e.g., rows) from the reconstitution formula from the other set (e.g., columns).

Usage

blockProj(data, b.weights, nI, FS, sv, data.metric = NULL)

Arguments

data

An I * J data matrix structured in K blocks of rows, each described by the same J variables.

b.weights

the weights for the K blocks. Can be a K by 1 vector or a scalar if all blocks have same weight.

nI

the number of rows of the blocks, Can be a K by 1 vector or a scalar if all blocks have same number of rows.

FS

An I * L matrix (with L: number of factors of the analysis) storing the factor scores for the I-set obtained from correspondence analysis.

sv

The singular values obtained from the analysis of the whole data table.

data.metric

(a J by 1 vector) stores the metric for the columns of X. When NULL (default) blockProj uses the standard transition formula and first transform the data into colum profiles. When the CA was not a standard CA (i.e., different centers or different metrics), data.metric is used to normalize the data matrix prior to the barycentric projection.

Details

This function is used when the original data table is made of blocks of rows (resp columns) all described by the same columns (resp. rows). In the row case, the rows are clustered in blocks of size I_1, ... ,I_k, ... I_K (with sum I_K = I) all described by J variables (i.e., columns). blockProj computes the variables (i.e., the J-set) partial projections of the K blocks of rows. The partial projections are barycentric to the whole set of projections (i.e., the barycenters off all K-blocks is equal to the factors for the whole matrix. The projections are obtained from the standard reconstitution formula generalized to the case of blocks with each block having a b-weight (with b_k > 0, and sum b_k = 1). When the data are obtained from a standard CA, the parameter data.metric does not need to be used. When the data are obtained from an unconventional CA (i.e., as performed with the decomposition in common and specific factors), data.metric gives the metric needed; for example, for the decomposition in common and specific factors, the specific analysis is performed with the same metric as the common analysis.

Value

a J (variables) by L (factors) by K (blocks) array storing the K "slices" of partial factor scores.

Author(s)

Herve Abdi

References

Escofier, B. (1983). Analyse de la difference entre deux mesures definies sur le produit de deux memes ensembles. Les Cahiers de l'Analyse des Donnees, 8, 325-329.

See Also

genCA

Examples

## Not run: 
if(interactive()){
 #EXAMPLE1
 }

## End(Not run)

HerveAbdi/PTCA4CATA documentation built on July 17, 2022, 5:41 a.m.