Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

loocv.dudi

Leave-one-out cross-validation for a dudi


Description

Leave-one-out cross-validation to check the dispersion of row coordinates in a dudi.

Usage

## S3 method for class 'dudi'
loocv(x, progress = FALSE, ...)

Arguments

x

the dudi of the bca on which cross-validation should be done

progress

logical to display a progress bar during computations (see the progress package)

...

further arguments passed to or from other methods

Details

This function returns a list with two elements: $XValCoord and $lsFac, the cross-validated row coordinates and a factor to plot them. The analysis is redone after removing each row of the data table, one at a time. The coordinates of the missing row are computed by projection as supplementary element in the dudi space. This can be used to check the dispersion of the coordinates of one point and it's sensitivity to outliers.

Value

a list with two elements: $XValCoord and $lsFac containing the cross-validated row coordinates and the factor to plot them using the s.class (see example).

Author(s)

Jean Thioulouse

See Also

Examples

data(meaudret)
envpca <- dudi.pca(meaudret$env, scannf = FALSE, nf = 3)
xvpca <- loocv(envpca)
s.match(envpca$li, xvpca$XValCoord)

ade4

Analysis of Ecological Data: Exploratory and Euclidean Methods in Environmental Sciences

v1.7-16
GPL (>= 2)
Authors
Stéphane Dray <stephane.dray@univ-lyon1.fr>, Anne-Béatrice Dufour <anne-beatrice.dufour@univ-lyon1.fr>, and Jean Thioulouse <jean.thioulouse@univ-lyon1.fr>, with contributions from Thibaut Jombart, Sandrine Pavoine, Jean R. Lobry, Sébastien Ollier, Daniel Borcard, Pierre Legendre, Stéphanie Bougeard and Aurélie Siberchicot. Based on earlier work by Daniel Chessel.
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.