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,
...
)
Returns the following:
Matrix of coefficients for different values of lambda
Matrix of residuals for different values of lambda.
Vector of rho, unpenalized portion of the objective function, for different values of lambda.
Data frame with "lambda" and second column is the evaluation based on the criteria selected.
Lambda which provides the smallest statistic for the selected criteria.
Penalty selected.
Whether intercept was included in model.
Group structure for penalty function.
Matrix of predictors.
Vector of responses.
Vector of groups.
Quantile being modeled.
Vector of lambdas. Default is for lambdas to be automatically generated.
Type of penalty: "LASSO", "SCAD" or "MCP".
Whether model should include an intercept. Constant does not need to be included in "x".
How models will be evaluated. Either cross-validation "CV", BIC "BIC" or large P BIC "PBIC".
If cross-validation is used how errors are evaluated. Check function "check", "SqErr" (Squared Error) or "AE" (Absolute Value).
K for K-folds cross-validation.
Group id for cross-validation. Function will randomly generate groups if not specified.
Number of lambdas for which models are fit.
Multiple of lambda max for Smallest lambda used.
Initial lambda used to find the maximum lambda. Not needed if lambda values are set.
Algorithm used for fit. Only "LP", "QICD" is no longer available.
Specify which groups will be penalized. Default is to penalize all groups.
Additional arguments to be sent to rq.group.fit
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.
if (FALSE) {
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")
}
Run the code above in your browser using DataLab