Learn R Programming

ade4 (version 1.7-13)

dudi.dec: Decentred Correspondence Analysis

Description

performs a decentred correspondence analysis.

Usage

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

References

Dol<U+00E9>dec, S., Chessel, D. and Olivier J. M. (1995) L'analyse des correspondances d<U+00E9>centr<U+00E9>e: application aux peuplements ichtyologiques du haut-Rh<U+00F4>ne. Bulletin Fran<U+00E7>ais de la P<U+00EA>che et de la Pisciculture, 336, 29--40.

Examples

Run this code
# NOT RUN {
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))
# }

Run the code above in your browser using DataLab