Learn R Programming

ade4 (version 1.5-2)

wca: Within-Class Analysis

Description

Performs a particular case of an Orthogonal Principal Component Analysis with respect to Instrumental Variables (orthopcaiv), in which there is only a single factor as covariable.

Usage

within(dudi, fac, scannf = TRUE, nf = 2)
## S3 method for class 'dudi':
wca(x, fac, scannf = TRUE, nf = 2, \dots)

Arguments

dudi
a duality diagram, object of class dudi obtained from the functions dudi.coa, dudi.pca,...
x
a duality diagram, object of class dudi from one of the functions dudi.coa, dudi.pca,...
fac
a factor partitioning the rows of dudi$tab in classes
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
...
further arguments passed to or from other methods

Value

  • Returns a list of the sub-class within in the class dudi
  • taba data frame containing the transformed data (substraction of the class mean)
  • callthe matching call
  • nfnumber of kept axes
  • rankthe rank of the analysis
  • ratiopercentage of within-class inertia
  • eiga numeric vector containing the eigenvalues
  • lwa numeric vector of row weigths
  • cwa numeric vector of column weigths
  • tabwa numeric vector of class weigths
  • facthe factor defining the classes
  • lidata frame row coordinates
  • l1data frame row normed scores
  • codata frame column coordinates
  • c1data frame column normed scores
  • lsdata frame supplementary row coordinates
  • asdata frame inertia axis onto within axis

encoding

latin1

References

Benz�cri, J. P. (1983) Analyse de l'inertie intra-classe par l'analyse d'un tableau de correspondances. Les Cahiers de l'Analyse des donn�es, 8, 351--358. Dol�dec, S. and Chessel, D. (1987) Rythmes saisonniers et composantes stationnelles en milieu aquatique I- Description d'un plan d'observations complet par projection de variables. Acta Oecologica, Oecologia Generalis, 8, 3, 403--426.

Examples

Run this code
data(meaudret)
par(mfrow = c(2,2))
pca1 <- dudi.pca(meaudret$env, scan = FALSE, nf = 4)
s.traject(pca1$li, meaudret$design$site, 
    sub = "Principal Component Analysis", csub = 1.5)
wit1 <- wca(pca1, meaudret$design$site, scan = FALSE, nf = 2)
s.traject(wit1$li, meaudret$design$site, 
    sub = "Within site Principal Component Analysis", csub = 1.5)
s.corcircle (wit1$as)
par(mfrow = c(1,1))
plot(wit1)

Run the code above in your browser using DataLab