gcvcss <-
function(eta,yty,xtx,xty,nqmat,ndpts,alpha) {
gcv <- tryCatch({
chi <- pinvsm(xtx+exp(eta)*nqmat)
parta <- chi%*%xty
gnum <- yty - 2*crossprod(xty,parta) + crossprod(parta,xtx%*%parta)
ndpts*gnum/((ndpts-alpha*sum(diag(chi%*%xtx)))^2)
}, error = function(e) yty)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.