Skip to contents

Operates a Principal Component Analysis on the Y outcome/response matrix by a singular Value Decomposition (the pre-processing involves the mean-centering of Y). Outputs are represented with the functions pcaScorePlot, pcaLoading1dPlot, pcaLoading2dPlot and pcaScreePlot.

Usage

pcaBySvd(Y = NULL, lmpDataList = NULL, nPC = min(dim(Y)))

Arguments

Y

The \(n \times m\) matrix with \(n\) observations and \(m\) (response) variables.

lmpDataList

A list with outcomes, design and formula, as outputted by data2LmpDataList.

nPC

Number of Principal Components to extract.

Value

A list containing the following elements:

scores

Scores

loadings

Loadings

eigval

Eigenvalues

singvar

Singular values

var

Explained variances

cumvar

Cumulated explained variances

original.dataset

Original dataset

design

Design of the study

Examples


data("UCH")

PCA.res1 <- pcaBySvd(Y = UCH$outcomes)

PCA.res2 <- pcaBySvd(lmpDataList = UCH)

identical(PCA.res1, PCA.res2)
#> [1] FALSE