dudi.dec: Decentred Correspondence Analysis

Description Usage Arguments Value Author(s) References Examples

Description

performs a decentred correspondence analysis.

Usage

1
dudi.dec(df, eff, scannf = TRUE, nf = 2)

Arguments

df

a data frame containing positive or null values

eff

a vector containing the reference distribution. Its length is equal to the number of rows of df

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

Value

Returns a list of class dec and dudi (see dudi) containing also

R

sum of all the values of the initial table

Author(s)

Daniel Chessel
Anne B Dufour anne-beatrice.dufour@univ-lyon1.fr

References

Dolédec, S., Chessel, D. and Olivier J. M. (1995) L'analyse des correspondances décentrée: application aux peuplements ichtyologiques du haut-Rhône. Bulletin Français de la Pêche et de la Pisciculture, 336, 29–40.

Examples

1
2
3
4
5
6
7
data(ichtyo)
dudi1 <- dudi.dec(ichtyo$tab, ichtyo$eff, scan = FALSE)
sum(apply(ichtyo$tab, 2, function(x)
    chisq.test(x, p = ichtyo$eff/sum(ichtyo$eff))$statistic))
sum(dudi1$eig) * sum(ichtyo$eff) # the same

s.class(dudi1$li, ichtyo$dat, wt = ichtyo$eff/sum(ichtyo$eff))

Example output

Warning message:
In any(eff) : coercing argument of type 'double' to logical
[1] 2851.051
Warning messages:
1: In chisq.test(x, p = ichtyo$eff/sum(ichtyo$eff)) :
  Chi-squared approximation may be incorrect
2: In chisq.test(x, p = ichtyo$eff/sum(ichtyo$eff)) :
  Chi-squared approximation may be incorrect
3: In chisq.test(x, p = ichtyo$eff/sum(ichtyo$eff)) :
  Chi-squared approximation may be incorrect
4: In chisq.test(x, p = ichtyo$eff/sum(ichtyo$eff)) :
  Chi-squared approximation may be incorrect
[1] 2851.051

ade4 documentation built on May 2, 2019, 5:50 p.m.

Related to dudi.dec in ade4...