View source: R/lmwPcaEffects.R
lmwPcaEffects | R Documentation |
Performs a PCA on each of the effect matrices from the outputs of lmwEffectMatrices
. It has an option to determine the method applied: ASCA, APCA or ASCA-E. Combined effects (i.e. linear combinations of original effect matrices) can also be created and decomposed.
lmwPcaEffects( resLmwEffectMatrices, method = c("ASCA", "APCA", "ASCA-E"), combineEffects = NULL, verbose = FALSE )
resLmwEffectMatrices |
A resLmwEffectMatrices list from |
method |
The method used to compute the PCA. One of |
combineEffects |
If not |
verbose |
If |
The function allows 3 different methods :
The PCA is applied directly on the pure effect matrix.
The PCA is applied directly on the pure effect matrix but scores are updated.
The PCA is applied on the augmented effect matrix.
The ASCA-E method adds the residuals to the scores. The APCA method adds the residuals to the effect matrix before the PCA.
A list of 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 :
lmwDataList
The initial object: a list of outcomes, design and formula.
effectsNamesUnique
A character vector with the p 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.
data('UCH') resLmwModelMatrix = lmwModelMatrix(UCH) resLmwEffectMatrices = lmwEffectMatrices(resLmwModelMatrix) resLmwPcaEffects = lmwPcaEffects(resLmwEffectMatrices, method="ASCA-E")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.