firstpos4ExPo: Makes positive the first value of factor scores and singular...

View source: R/firstpos4Expo.R

firstpos4ExPoR Documentation

Makes positive the first value of factor scores and singular vectors from the output of functions (e.g., epPCA, epCA) from the ExPosition package.

Description

firstpos4ExPo: makes positive the first element of the column factor scores (i.e., fj) and column singular vectors (i.e., pdq$q) of analyses performed with the ExPosition package. firstpos4ExPo also insures that the sign of the column factor scores and singular vectors agree with the row factors scores (i.e., fi) and singular vectors (i.e., pdq$p).

The transformation implemented by firstpos4ExPo makes it easier to compare results from different analyses because the sign of the factor scores and singular vectors is arbitrary (i.e., a singular vector multiplied by -1 is still a singular vector).

Usage

firstpos4ExPo(resFile)

Arguments

resFile

The result of an analysis of a function from the ExPosition package (e.g., epPCA, epCA)

Details

Note that only the results of the computation are affected by the firstpos4ExPo, the graphics are not affected. So when using firstpos4ExPo it is wise to set the option graphs = FALSE. Also, a similar version of firstpos4ExPo for the InPosition family is not yet available.

Value

An ExPosition object with the corrected results.

Author(s)

Hervé Abdi

See Also

firstpos, renormInertiaExPo

Examples

## Not run: 
data("mtcars") # load the mtcars data set 
resPCA.mtcars <- firstpos4ExPo(epPCA(mtcars, graphs = FALSE, k = 3))
# Check that the first element of the column vectors is positive
resPCA.mtcars$resPCA.mtcars$ExPosition.Data$fj

## End(Not run)

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