supplementary4Vari: Compute the projection of supplementary elements (rows or...

View source: R/Supplementary4Vari.R

supplementary4VariR Documentation

Compute the projection of supplementary elements (rows or columns) for a PCA followed by a Varimax rotation.

Description

supplementary4Vari Computes the projection of supplementary elements (rows or columns) for a PCA (computed with ExPosition::epPCA()) followed by a Varimax rotation (computed with data4PCCAR::epVari()). Supplementary elements can be rows or columns: If the original data set had dimensions I by J, supplementary rows should have dimensions Isup by J, and supplementary columns should have dimensions I by Jsup. Note that for supplementary columns, the parameters scale and center need to be specified in the call.

Usage

supplementary4Vari(
  SUP.DATA,
  resPCA,
  resVari,
  set = "rows",
  center = TRUE,
  scale = "SS1"
)

Arguments

SUP.DATA

the supplementary data set. Can be rows (dimensions Isup by J) or columns (dimensions I by Jsup).

resPCA

the results of a PCA performed by ExPosition::epPCA().

resVari

the results of a Varimax rotation performed by data4PCCAR::epiVari on the same data set as resPCA.

set

what set ('rows' or 'columns') is projected (Default: 'rows')

center

value of the center parameter that was used for the original PCA analysis for columns (Default: TRUE).

scale

value of the scale parameter that was used for the original PCA analysis for columns (Default: 'SS1'; look at ExPosition::epPCA for possible values).

Details

The computation of the coordinates is obtained by first projecting the data as supplementary elements (using supplementaryCols or supplementaryRows from ExPosition) in the unrotated space and then rotating in the Varimax space using the rotation matrix from epiVari().

Value

a list with the coordinates of the elements in the Varimax space. Coordinates are denoted $fii for the rows and $fjj for the columns.

Author(s)

Hervé Abdi

See Also

epVari epPCA

Examples

## Not run: 
if(interactive()){
library(ExPosition) # for epPCA()
resPCA       <- epPCA(iris[1:4], scale = 'SS1', graphs = FALSE)
resVari      <- epVari(resPCA)
resVariSup.i <- supplementary4Vari(matrix(c(5,4,2,.5), nrow = 1),
                                   resPCA, resVari)
 }

## End(Not run)

HerveAbdi/data4PCCAR documentation built on Sept. 11, 2022, 4:19 p.m.