cvdglars(formula, family = c("binomial", "poisson"), data,
subset, contrast = NULL, control = list())cvdglars.fit(X, y, family = c("binomial", "poisson"),
control = list())
cvdglars returns an object with S3 class "cvdglars", i.e. a list containing the following components:ng used to store the mean cross-validation deviance;ng used to store the variance of the mean cross-validation deviance;cvdglars function runs dglars nfold+1 times. The deviance is stored, and the average and its standard deviation over the folds are computed.cvdglars.fit is the workhorse function: it is more efficient when the design matrix have already been calculated. For this reason we suggest to use this function
when the dgLARS method is applied in a high-dimensional setting, i.e. when p>n .
The control argument is a list that can supply any of the following components:
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Augugliaro L., Mineo A.M. and Wit E.C. (2012) Differential geometric LARS via cyclic coordinate descent method, in Proceeding of COMPSTAT 2012, pp. 67-79. Limassol, Cyprus.
coef.cvdglars, print.cvdglars, plot.cvdglars methods###########################
# Logistic regression model
set.seed(123)
n <- 100
p <- 10
X <- matrix(rnorm(n*p), n, p)
b <- 1:2
eta <- b[1] + X[,1] * b[2]
mu <- binomial()$linkinv(eta)
y <- rbinom(n, 1, mu)
fit_cv <- cvdglars.fit(X, y, family = "binomial")
fit <- dglars.fit(X, y, family = "binomial", control = list(g0=fit_cv$g_hat))
fit_cv
fit$beta[,fit$np]Run the code above in your browser using DataLab