R/targetsvcm.R

Defines functions targetsvcm

targetsvcm <- function(lambda) {
  
  predictsvcm(lambda, type = type)
  if (type == "TP") {
    GCV <- drop(as.matrix(n * crossprod(y - eta) / (n - ED)^2))
  } else if (type == "SEQ") {
    GCV <- n * sum((Y - eta)^2) / (n - ED)^2
  }
  assign("GCVtab", rbind(GCVtab, c(lambda, GCV)), env = svcm.env)
  return(GCV)
  
}

Try the svcm package in your browser

Any scripts or data that you put into this service are public.

svcm documentation built on May 2, 2019, 1:29 p.m.