cv.rq.group.pen | R Documentation |
This function is no longer exported. Recommend using rq.group.pen.cv() instead.
cv.rq.group.pen(
x,
y,
groups,
tau = 0.5,
lambda = NULL,
penalty = "SCAD",
intercept = TRUE,
criteria = "CV",
cvFunc = "check",
nfolds = 10,
foldid = NULL,
nlambda = 100,
eps = 1e-04,
init.lambda = 1,
alg = "huber",
penGroups = NULL,
...
)
x |
Matrix of predictors. |
y |
Vector of responses. |
groups |
Vector of groups. |
tau |
Quantile being modeled. |
lambda |
Vector of lambdas. Default is for lambdas to be automatically generated. |
penalty |
Type of penalty: "LASSO", "SCAD" or "MCP". |
intercept |
Whether model should include an intercept. Constant does not need to be included in "x". |
criteria |
How models will be evaluated. Either cross-validation "CV", BIC "BIC" or large P BIC "PBIC". |
cvFunc |
If cross-validation is used how errors are evaluated. Check function "check", "SqErr" (Squared Error) or "AE" (Absolute Value). |
nfolds |
K for K-folds cross-validation. |
foldid |
Group id for cross-validation. Function will randomly generate groups if not specified. |
nlambda |
Number of lambdas for which models are fit. |
eps |
Multiple of lambda max for Smallest lambda used. |
init.lambda |
Initial lambda used to find the maximum lambda. Not needed if lambda values are set. |
alg |
Algorithm used for fit. "QICD" or "LP". |
penGroups |
Specify which groups will be penalized. Default is to penalize all groups. |
... |
Additional arguments to be sent to rq.group.fit or groupQICDMultLambda. |
Returns the following:
beta Matrix of coefficients for different values of lambda
residuals Matrix of residuals for different values of lambda.
rhoVector of rho, unpenalized portion of the objective function, for different values of lambda.
cv Data frame with "lambda" and second column is the evaluation based on the criteria selected.
lambda.min Lambda which provides the smallest statistic for the selected criteria.
penalty Penalty selected.
interceptWhether intercept was included in model.
groupsGroup structure for penalty function.
Yuan, M. and Lin, Y. (2006). Model selection and estimation in regression with grouped variables. J. R. Statist. Soc. B, 68, 49-67.
Peng, B. and Wang, L. (2015). An Iterative Coordinate Descent Algorithm for High-Dimensional Nonconvex Penalized Quantile Regression. Journal of Computational and Graphical Statistics, 24, 676-694.
## Not run:
x <- matrix(rnorm(800),nrow=100)
y <- 1 + x[,1] - 3*x[,5] + rnorm(100)
cv_model <- cv.rq.group.pen(x,y,groups=c(rep(1,4),rep(2,4)),criteria="BIC")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.