R/print.sparsenet.R

Defines functions print.sparsenet

Documented in print.sparsenet

print.sparsenet=function(x,digits = max(3, getOption("digits") - 3),...){
  cat("\nCall: ", deparse(x$call), "\n\n")
  coeflist=x$coefficients
  rsq=x$rsq
  gnames=names(coeflist)
  for(i in seq(along=coeflist)){
    x=coeflist[[i]]
    cat(gnames[i],": Gamma = ",signif(x$gamma,digits),"\n")
    print(cbind(Df=x$df,"Rsq"=signif(rsq[i,],digits),Lambda=signif(x$lambda,digits)))
  }
}

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.