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 :
scoresScores from the PCA for each principal component.
loadingsLoadings from the PCA for each principal component.
eigvalEigenvalues of each principal component.
singvarSingular values of each principal component.
varExplained variances of each principal component.
cumvarCumulated explained variances of each principal component.
original.datasetOriginal dataset.
There are also others outputs :
lmpDataListThe initial object: a list of outcomes, design and formula.
effectsNamesUniqueA character vector with the F+1 names of the model terms, each repeated once.
methodThe dimension reduction method used:
c("ASCA","APCA","ASCA-E").type3SSA vector with the type III SS for each model term.
variationPercentagesA 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")