Learn R Programming

ade4 (version 1.01)

between: Between-Class Analysis

Description

Performs a particular case of a Principal Component Analysis on Instrumental Variables, in which there is only one instrumental variable, and it is a factor

Usage

between(dudi, fac, scannf = TRUE, nf = 2)
plot.between(x, xax = 1, yax = 2, ...) 
print.between(x, ...)

Arguments

dudi
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, a numeric value indicating the number of kept axes
x
an object of class 'between'
xax, yax
the numbers of the x-axis and the y-axis
...
further arguments passed to or from other methods

Value

  • Returns a list of subclass 'between' of class 'dudi' (see dudi)
  • taba data frame class-variables, array of variables means in each class
  • cwa numeric vector of the column weigths
  • lwa numeric vector of the group weigths
  • eiga numeric vector with all the eigenvalues
  • rankan integer
  • nfan integer value indicating the number of kept axes
  • c1a data frame with the column normed scores
  • l1a data frame with the class normed scores
  • coa data frame with the column coordinates
  • lia data frame with the class coordinates
  • callthe origin
  • ratiothe bewteen-class inertia percentage
  • lsa data frame with the row coordinates
  • asa data frame containing the projection of inertia axes onto between axes

References

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$mil, scan = FALSE, nf = 4)
s.class(pca1$li, meaudret$plan$sta,
    sub = "Principal Component Analysis (mil)", csub = 1.75)
pca2 <- dudi.pca(meaudret$fau, scal = FALSE, scan = FALSE, nf = 4)
s.class(pca2$li, meaudret$pla$sta,
    sub = "Principal Component Analysis (fau)", csub = 1.75)
bet1 <- between(pca1, meaudret$plan$sta, scan = FALSE, nf = 2)
bet2 <- between(pca2, meaudret$plan$sta, scan = FALSE, nf = 2)
s.class(bet1$ls, meaudret$plan$sta,
    sub = "Between sites PCA (mil)", csub = 1.75)
s.class(bet2$ls, meaudret$plan$sta,
    sub = "Between sites PCA (fau)", csub = 1.75)

par(mfrow=c(1,1))
coib <- coinertia(bet1, bet2, scann = FALSE)
plot(coib)

Run the code above in your browser using DataLab