Description Usage Arguments Value Examples

Performs cross-validation of a `treeda`

fit.

1 2 3 |

`response` |
The classes to be predicted. |

`predictors` |
A matrix of predictors corresponding to the tips of the tree. |

`tree` |
A tree object of class |

`folds` |
Either a single number corresponding to the number of folds of cross-validation to perform or a vector of integers ranging from 1 to the number of folds desired giving the partition of the dataset. |

`pvec` |
The values of p to use. |

`k` |
The number of discriminating axes to keep. |

`center` |
Center the predictors? |

`scale` |
Scale the predictors? |

`class.names` |
A vector giving the names of the classes. |

`...` |
Additional arguments to be passed to |

A list with the value of p with minimum cv error
(`p.min`

), the minimum value of p with in 1 se of the
minimum cv error (`p.1se`

), and a data frame containing
the loss for each fold, mean loss, and standard error of the
loss for each value of p (`loss.df`

).

1 2 3 4 5 6 | ```
data(treeda_example)
out.treedacv = treedacv(response = treeda_example$response,
predictors = treeda_example$predictors,
tree = treeda_example$tree,
pvec = 1:10)
out.treedacv
``` |

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.