R/mod.cv.glmnet.R

mod.cv.glmnet <- function(x, y, weights, offset = NULL, lambda = NULL, type.measure = c("mse", 
    "deviance", "class", "auc", "mae"), ..., nfolds = 10, foldid, 
    grouped = TRUE) {

    out <- glmnet::cv.glmnet(x=x,y=y, ..., nfolds = nfolds)
    val <- coef(out, s=out$lambda.min)[-1]
    return(val)
}

Try the hdlm package in your browser

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

hdlm documentation built on May 2, 2019, 8:35 a.m.