#' Leave one out cross validation
#'
#' @param model An R object, typically returned by lm or glm.
#'
#' @return Cross validation risk error
#' @export
#'
#' @examples
loocv <- function(model) {
return(mean((residuals(model) / (1 - hatvalues(model)))^2))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.