withinpca: Normed within principal component analysis

Description Usage Arguments Details Value Author(s) References Examples

Description

Performs a normed within Principal Component Analysis.

Usage

1
2
withinpca(df, fac, scaling = c("partial", "total"), 
    scannf = TRUE, nf = 2)

Arguments

df

a data frame with quantitative variables

fac

a factor partitioning the rows of df in classes

scaling

a string of characters as a scaling option :
if "partial", the sub-table corresponding to each class is centred and normed.
If "total", the sub-table corresponding to each class is centred and the total table is then normed.

scannf

a logical value indicating whether the eigenvalues bar plot should be displayed

nf

if scannf FALSE, an integer indicating the number of kept axes

Details

This functions implements the 'Bouroche' standardization. In a first step, the original variables are standardized (centred and normed). Then, a second transformation is applied according to the value of the scaling argument. For "partial", variables are standardized in each sub-table (corresponding to each level of the factor). Hence, variables have null mean and unit variance in each sub-table. For "total", variables are centred in each sub-table and then normed globally. Hence, variables have a null mean in each sub-table and a global variance equal to one.

Value

returns a list of the sub-class within of class dudi. See within

Author(s)

Daniel Chessel
Anne-B<c3><a9>atrice Dufour anne-beatrice.dufour@univ-lyon1.fr

References

Bouroche, J. M. (1975) Analyse des donn<c3><a9>es ternaires: la double analyse en composantes principales. Th<c3><a8>se de 3<c3><a8>me cycle, Universit<c3><a9> de Paris VI.

Examples

1
2
3
4
5
6
7
data(meaudret)
wit1 <- withinpca(meaudret$env, meaudret$design$season, scannf = FALSE, scaling = "partial")
kta1 <- ktab.within(wit1, colnames = rep(c("S1", "S2", "S3", "S4", "S5"), 4))
unclass(kta1)

# See pta
plot(wit1)

ade4 documentation built on May 29, 2017, 2:05 p.m.

Search within the ade4 package
Search all R packages, documentation and source code