Learn R Programming

ade4 (version 1.5-2)

bca: Between-Class Analysis

Description

Performs a particular case of a Principal Component Analysis with respect to Instrumental Variables (pcaiv), in which there is only a single factor as explanatory variable.

Usage

between(dudi, fac, scannf = TRUE, nf = 2)
## S3 method for class 'dudi':
bca(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 barplot should be displayed
nf
if scannf FALSE, a numeric value indicating the number of kept axes
...
further arguments passed to or from other methods

Value

  • Returns a list of class dudi, subclass 'between' containing
  • taba data frame class-variables containing the means per class for each variable
  • cwa numeric vector of the column weigths
  • lwa numeric vector of the class weigths
  • eiga numeric vector with all the eigenvalues
  • rankthe rank of the analysis
  • 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 matching call
  • ratiothe bewteen-class inertia percentage
  • lsa data frame with the row coordinates
  • asa data frame containing the projection of inertia axes onto between axes

encoding

latin1

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$env, scan = FALSE, nf = 4)
s.class(pca1$li, meaudret$design$site,
    sub = "Principal Component Analysis (env)", csub = 1.75)
pca2 <- dudi.pca(meaudret$spe, scal = FALSE, scan = FALSE, nf = 4)
s.class(pca2$li, meaudret$design$site,
    sub = "Principal Component Analysis (spe)", csub = 1.75)
bet1 <- bca(pca1, meaudret$design$site, scan = FALSE, nf = 2)
bet2 <- bca(pca2, meaudret$design$site, scan = FALSE, nf = 2)
s.class(bet1$ls, meaudret$design$site,
    sub = "Between sites PCA (env)", csub = 1.75)
s.class(bet2$ls, meaudret$design$site,
    sub = "Between sites PCA (spe)", 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