Nothing
crsCv <- function( x ) {
yDat <- x$y
mframe <- model.frame( x )
mform <- x$formula
res <- rep( NA, nrow( mframe ) )
for( i in 1:nrow( mframe ) ) {
tmp <- crs( mform, degree = x$degree, segments = x$segments,
lambda = x$lambda, basis = x$basis, cv = "none",
data = mframe[ -i, ] )
res[ i ] <- yDat[ i ] - predict( tmp, newdata = mframe[ i, ] )
}
cv <- mean( res^2 )
attr( cv, "err" ) <- res
return( cv )
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.