Description Usage Arguments Details Value Note Author(s) See Also Examples

Performs a leave-one-out cross-validation of a predictive Co-Correspondence Analysis model.

1 2 3 4 5 6 7 |

`y` |
the response species matrix. |

`x` |
the predictor species matrix. |

`n.axes` |
the number of axes to calculate the leave-one-out cross-validation for. Default is to perform the CV for all extractable axes. |

`centre` |
centre |

`verbose` |
if |

`object` |
an object of class |

`axes` |
the number of axes to summarise results for. |

`...` |
further arguments to |

Performs a leave-one-out cross-validation of a predictive Co-Correspondence Analysis model. It can be slow depending on the number of columns in the matrices, and of course the number of sites.

Returns a large list with the following components:

`dimx, dimy ` |
the dimensions of the input matrices |

`press0 ` |
the |

`n.axes ` |
the number of axes tested. |

`CVfit ` |
the cross-validatory fit. |

`varianceExp` |
list with components |

`totalVar` |
list with components |

`nam.dat` |
list with components |

`call ` |
the R call used. |

This function is not a bit out-of-date compared to some of the
other functions. It should have a formular interface like
`coca`

or work on the results from `coca`

,
although that will have to be altered to store a copy of the data?

Gavin L. Simpson, based on Matlab code by C.J.F. ter Braak and A.P. Schaffers.

The model fitting function `coca`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ```
## load the data sets
data(beetles)
data(plants)
## log transform the bettle data
beetles <- log(beetles + 1)
## predictive CoCA using SIMPLS and formula interface
bp.pred <- coca(beetles ~ ., data = plants)
## should retain only the useful PLS components for a
## parsimonious model
## Leave-one-out crossvalidation - this takes a while
## Not run:
crossval(beetles, plants)
## End(Not run)
## so 2 axes are sufficient
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.