Skip to contents

Performs a PCA on each of the effect matrices from the outputs of lmpEffectMatrices. It has an option to choose the method applied: ASCA, APCA or ASCA-E. Combined effects (i.e. linear combinations of original effect matrices) can also be created and decomposed by PCA.

Usage

lmpPcaEffects(
  resLmpEffectMatrices,
  method = c("ASCA", "APCA", "ASCA-E"),
  combineEffects = NULL,
  verbose = FALSE
)

Arguments

resLmpEffectMatrices

A resLmpEffectMatrices list resulting of lmpEffectMatrices.

method

The method used to compute the PCA. One of c("ASCA","APCA","ASCA-E").

combineEffects

If not NULL, a list of vectors containing the names of the effects to be combined.

verbose

If TRUE, will display a message with the duration of execution.

Value

A list with first,the PCA results from pcaBySvd for each effect matrix. Those results contain :

scores

Scores from the PCA for each principal component.

loadings

Loadings from the PCA for each principal component.

eigval

Eigenvalues of each principal component.

singvar

Singular values of each principal component.

var

Explained variances of each principal component.

cumvar

Cumulated explained variances of each principal component.

original.dataset

Original dataset.

There are also others outputs :

lmpDataList

The initial object: a list of outcomes, design and formula.

effectsNamesUnique

A character vector with the F+1 names of the model terms, each repeated once.

method

The dimension reduction method used: c("ASCA","APCA","ASCA-E").

type3SS

A vector with the type III SS for each model term.

variationPercentages

A vector with the percentage of variance explained by each model term.

Details

The function allows 3 different methods :

ASCA

PCA is applied directly on each pure effect matrix \(\hat{\mathbf{M}}_f, f=1...F\).

ASCA-E

PCA is applied on each pure effect matrix but then the augmented effect matrix is projected in the space of the ASCA components.

APCA

PCA is applied on each augmented effect matrix : \(\hat{\mathbf{M}}_f+\hat{\mathbf{E}}\).

References

Thiel M.,Feraud B. and Govaerts B. (2017) ASCA+ and APCA+: Extensions of ASCA and APCA in the analysis of unbalanced multifactorial designs. Journal of Chemometrics. 31:e2895. https://doi.org/10.1002/cem.2895

Examples

data("UCH")
resLmpModelMatrix <- lmpModelMatrix(UCH)
resLmpEffectMatrices <- lmpEffectMatrices(resLmpModelMatrix)
resLmpPcaEffects <- lmpPcaEffects(resLmpEffectMatrices, method = "ASCA-E")