CVerror | R Documentation |
Given a logistic regression model (via glm), or an LDA or QDA model, and a number of folds k, the k-Fold CV error rate is calculated.
CVerror(mod, k = nrow(stats::model.frame(mod)))
mod |
A logistic regression, LDA, or QDA model |
k |
Number of folds; by default LOOCV will be returned |
The k-fold CV error rate if k is entered, otherwise the LOOCV error rate.
mtcars$am=as.factor(mtcars$am)
gmod=glm(am~mpg,binomial,mtcars)
CVerror(gmod)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.