R/predict.cv.glmgraph.R

predict.cv.glmgraph <- function(object,X,s=c("lambda1.min","lambda1.1se"),type=c("response", "coefficients", "class", "nzeros","link"),...) {
	s <- match.arg(s)
	if(s=="lambda1.min") return(predict(object$obj.min,X,type=type)[[1]])
	else if(s=="lambda1.1se") return(predict(object$obj.1se,X,type=type)[[1]])
	else stop("Invalid type")
}

Try the glmgraph package in your browser

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

glmgraph documentation built on May 1, 2019, 7:04 p.m.