getBiplotCoor: Compute the biplot coordinates of variables for a PCA...

View source: R/getBiplot4PCA.R

getBiplotCoorR Documentation

Compute the biplot coordinates of variables for a PCA computed with ExPosition::epPCA().

Description

getBiplotCoor Computes the biplot coordinates of variables for a PCA computed with ExPosition::epPCA().

Usage

getBiplotCoor(res.epPCA, varLength = NULL, axis1 = 1, axis2 = 2)

Arguments

res.epPCA

the output of ExPosition::epPCA()

varLength

the length of the variables. When NULL (Default) getBiplot uses the norm of the positive part of the vector.

axis1

horizontal axis (Default: 1) (used to compute the constraints).

axis2

vertical axis (Default: 2) (used to compute the constraints).

Details

getBiplotCoor projects the "biploted" variables on the singular vectors (equivalent to a projection as supplementary elements) and rescale the output so that the variables have the correct length. Note that only the positive part of the variables is kept.

Value

a list (of class 'coor4biplot') with 1) coordArrow the coordinates of the arrows. These coordinates can be used, for example, to plot these arrows on a graph created by createFactorMap and 2) constraints4Biplot the constraints to be used for the maps (created, e.g., by prettyPlot or createFactorMap). See also minmaxHelper.

Author(s)

Hervé Abdi

See Also

addArrowsAndNames epPCA minmaxHelper prettyPlot createFactorMap

Examples

## Not run: 
data("twentyWines") # get the 20 wines data set
resPCA <- ExPosition::epPCA(twentyWines$df.active, 
                         scale = FALSE, graphs = FALSE) # PCA
getCoordinates <- getBiplotCoor(resPCA) # get biplot coordinates
# to plot them see help for addArrowsAndNames

## End(Not run)

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