R/coef.cv.sparsenet.R

Defines functions coef.cv.sparsenet

Documented in coef.cv.sparsenet

coef.cv.sparsenet=function(object,which=c("parms.min","parms.1se"),...){
which=match.arg(which)
switch(which,
       parms.min={lambda=object$parms.min[2];which.gamma=object$which.min[2]},
       parms.1se={lambda=object$parms.1se[2];which.gamma=object$which.1se[2]}
       )
  coef(object$sparsenet.fit,s=lambda,which.gamma=which.gamma,...)
}

Try the sparsenet package in your browser

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

sparsenet documentation built on May 29, 2017, 2:19 p.m.