Description Usage Arguments Details Value Author(s) References See Also Examples
This function vfold crossvalidates a discriminant analysis through the leavevout procedure.
1  vcrossv.da(x, f, fold, nsimulat, funct)

x 
A matrix with samples in columns and taxa in rows. The rows must be named after taxa names (see 
f 
An object of class 
fold 
Value of v, i.e. number of elements to be left out in each validation. 
nsimulat 
Number of samples simulated to desaturate the model (see CorreaMetrio et al (in review) for details). If no samples were simulated 
funct 

The function was designed for discrimination of pollen taxa into dichotomous ecological groups (only admits two factors). The prior information corresponds to the affinity of certain taxa to known environmental conditions. Therefore, while the taxa corrrespond to the objects to classify, the percentages through the fossil dataset correspond to the attributes. Each time the discriminant function is adjusted, v elements are left out with no replacements. Therefore, it is recommended that v be smaller than half of the total taxa, unless there is a considerable number of species. Take also into consideration that each time a taxon is left out for the crossvalidation, all the samples that were simulated for such taxon are left out too.
A list containing:
posterior 
The a posteriori probability of each taxa belonging to each one of the defined groups. 
comp2 
Binary classification of the taxa. 
accuracy 
The percentage of cases well classified in the crossvalidation. 
Alexander CorreaMetrio, Kenneth R. Cabrera.
CorreaMetrio, A., K.R. Cabrera, and M.B. Bush. 2010. Quantifying ecological change through discriminant analysis: a paleoecological example from the Peruvian Amazon. Journal of Vegetation Science 21: 695704.
Venables, W.N., and B.D. Ripley. 2002. "Modern applied statistics with S". Springer, New York.
vcrossv.all
.lda
and qda
(package MASS) for details on the discriminant functions. simulat
and simulat.t
for details on samples simulations.
1 2 3 4 5 6 7 8 9 10 11  data(quexilper)
# Taking only a fraction of the data base so the model is not saturated
a<quexilper[1:10,1:20]
a<t(a)
# build a dummy factor assuming that the first 10 species belong
# to group1 and the send ten belong to group 2
b<as.factor(rep(c("group1","group2"),each=10))
#to apply ordinary crossvalidation (leaveoneout)
vcrossv.da(a,b,fold=1,nsimulat=1,funct=lda)
#to apply 3fold crossvalidation
vcrossv.da(a,b,fold=3,nsimulat=1,funct=lda)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.