Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/ncpen_cpp_wrap.R
performs k-fold cross-validation (CV) for nonconvex penalized regression models
over a sequence of the regularization parameter lambda
.
1 2 3 4 5 6 7 8 9 10 | cv.ncpen(y.vec, x.mat, family = c("gaussian", "linear", "binomial",
"logit", "poisson", "multinomial", "cox"), penalty = c("scad", "mcp",
"tlp", "lasso", "classo", "ridge", "sridge", "mbridge", "mlog"),
x.standardize = TRUE, intercept = TRUE, lambda = NULL,
n.lambda = NULL, r.lambda = NULL, w.lambda = NULL, gamma = NULL,
tau = NULL, alpha = NULL, df.max = 50, cf.max = 100,
proj.min = 10, add.max = 10, niter.max = 30, qiter.max = 10,
aiter.max = 100, b.eps = 1e-06, k.eps = 1e-04, c.eps = 1e-06,
cut = TRUE, local = FALSE, local.initial = NULL, n.fold = 10,
fold.id = NULL)
|
y.vec |
(numeric vector) response vector.
Must be 0,1 for |
x.mat |
(numeric matrix) design matrix without intercept.
The censoring indicator must be included at the last column of the design matrix for |
family |
(character) regression model. Supported models are
|
penalty |
(character) penalty function.
Supported penalties are
|
x.standardize |
(logical) whether to standardize |
intercept |
(logical) whether to include an intercept in the model. |
lambda |
(numeric vector) user-specified sequence of |
n.lambda |
(numeric) the number of |
r.lambda |
(numeric) ratio of the smallest |
w.lambda |
(numeric vector) penalty weights for each coefficient (see references). If a penalty weight is set to 0, the corresponding coefficient is always nonzero. |
gamma |
(numeric) additional tuning parameter for controlling shrinkage effect of |
tau |
(numeric) concavity parameter of the penalties (see reference).
Default is 3.7 for |
alpha |
(numeric) ridge effect (weight between the penalty and ridge penalty) (see details).
Default value is 1. If penalty is |
df.max |
(numeric) the maximum number of nonzero coefficients. |
cf.max |
(numeric) the maximum of absolute value of nonzero coefficients. |
proj.min |
(numeric) the projection cycle inside CD algorithm (largely internal use. See details). |
add.max |
(numeric) the maximum number of variables added in CCCP iterations (largely internal use. See references). |
niter.max |
(numeric) maximum number of iterations in CCCP. |
qiter.max |
(numeric) maximum number of quadratic approximations in each CCCP iteration. |
aiter.max |
(numeric) maximum number of iterations in CD algorithm. |
b.eps |
(numeric) convergence threshold for coefficients vector. |
k.eps |
(numeric) convergence threshold for KKT conditions. |
c.eps |
(numeric) convergence threshold for KKT conditions (largely internal use). |
cut |
(logical) convergence threshold for KKT conditions (largely internal use). |
local |
(logical) whether to use local initial estimator for path construction. It may take a long time. |
local.initial |
(numeric vector) initial estimator for |
n.fold |
(numeric) number of folds for CV. |
fold.id |
(numeric vector) fold ids from 1 to k that indicate fold configuration. |
Two kinds of CV errors are returned: root mean squared error and negative log likelihood.
The results depends on the random partition made internally.
To choose an optimal coefficients form the cv results, use coef.cv.ncpen
.
ncpen
does not search values of gamma
, tau
and alpha
.
An object with S3 class cv.ncpen
.
ncpen.fit |
ncpen object fitted from the whole samples. |
fold.index |
fold ids of the samples. |
rmse |
rood mean squared errors from CV. |
like |
negative log-likelihoods from CV. |
lambda |
sequence of |
Dongshin Kim, Sunghoon Kwon, Sangin Lee
Fan, J. and Li, R. (2001). Variable selection via nonconcave penalized likelihood and its oracle properties. Journal of the American statistical Association, 96, 1348-60. Zhang, C.H. (2010). Nearly unbiased variable selection under minimax concave penalty. The Annals of statistics, 38(2), 894-942. Shen, X., Pan, W., Zhu, Y. and Zhou, H. (2013). On constrained and regularized high-dimensional regression. Annals of the Institute of Statistical Mathematics, 65(5), 807-832. Kwon, S., Lee, S. and Kim, Y. (2016). Moderately clipped LASSO. Computational Statistics and Data Analysis, 92C, 53-67. Kwon, S. Kim, Y. and Choi, H.(2013). Sparse bridge estimation with a diverging number of parameters. Statistics and Its Interface, 6, 231-242. Huang, J., Horowitz, J.L. and Ma, S. (2008). Asymptotic properties of bridge estimators in sparse high-dimensional regression models. The Annals of Statistics, 36(2), 587-613. Zou, H. and Li, R. (2008). One-step sparse estimates in nonconcave penalized likelihood models. Annals of statistics, 36(4), 1509. Lee, S., Kwon, S. and Kim, Y. (2016). A modified local quadratic approximation algorithm for penalized optimization problems. Computational Statistics and Data Analysis, 94, 275-286.
plot.cv.ncpen
, coef.cv.ncpen
, ncpen
, predict.ncpen
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.