PCALMEffects: PCA on the effect matrices

Description Usage Arguments Details Value Examples

View source: R/PCALMEffects.R

Description

Run a Principal Component Analysis on the effect matrices and adapt the result according to the method.

Usage

1
PCALMEffects(ResLMEffectMatrices, method = c("ASCA", "APCA", "ASCA-E"))

Arguments

ResLMEffectMatrices

a ResLMEffectMatrices list from LMEffectMatrices

method

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

Details

The function allows 3 different methods :

ASCA

The PCA is applied directly on the pure effect matrix

ASCA-E

The PCA is applied directly on the pure effect matrix but scores are updated

APCA

The PCA is applied on the augmented effect matrix

The ASCA-E method add the residual to the scores. APCA applied add the residuals to the effect matrix before the PCA.

Value

A list of PCA results from SVDforPCA for each effect matrix. Those results contain :

scores

Scores from the PCA for each of the n components

loadings

Loadings from the PCA for each of the n component

eigval

Eigenvalues of each of the n component

pcd

Singular values of each of the n component

pcu

nxn matrix of normalized scores

var

Explained variance of each of the n component

cumvar

Cumulated explained variance of each of the n component

original.dataset

Original dataset

There are also others outputs :

method
Type3Residuals
variationPercentages

Examples

1
2
3
4
5
6
data('UCH')
ResLMModelMatrix = LMModelMatrix(formula=as.formula(UCH$formula),design=UCH$design)
ResLMEffectMatrices = LMEffectMatrices(ResLMModelMatrix,outcomes=UCH$outcomes)
ResPCALMEffects = PCALMEffects(ResLMEffectMatrices,method="ASCA-E")
 PlotScoresXY(ResPCALMEffects,UCH$design,EffectVector=c("Hippurate"),
               varname.color=c("Citrate"),varname.pch=c("Time"))

FranceschiniS/LMWiRe documentation built on Oct. 30, 2019, 6:20 p.m.