cv.rq.group.pen: Cross Validated quantile regression with group penalty

Description Usage Arguments Value Author(s) References Examples

View source: R/mainFunctions.R

Description

Similar to cv.rq.pen function, but uses group penalty. Group penalties use the L1 norm instead of L2 for computational convenience. QICD is a group penalty extension of the algorithm presented by Peng and Wang (2015). LP does a linear programming version of the group penalty.

Usage

1
2
3
4
5
cv.rq.group.pen(x, y, groups, tau = 0.5, lambda = NULL, penalty = "LASSO", 
    intercept = TRUE, criteria = "CV", cvFunc = "check", nfolds = 10, 
    foldid = NULL, nlambda = 100, eps = 1e-04, init.lambda = 1,alg="QICD", 
	penGroups=NULL,
    ...)

Arguments

x

Matrix of predictors.

y

Vector of response values.

groups

Vector assigning columns of x to groups.

tau

Conditional quantile being modelled.

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

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.

Value

Returns the following:

beta

Matrix of coefficients for different values of lambda

residuals

Matrix of residuals for different values of lambda.

rho

Vector 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.

intercept

Whether intercept was included in model.

groups

Group structure for penalty function.

Author(s)

Ben Sherwood

References

[1] Yuan, M. and Lin, Y. (2006). Model selection and estimation in regression with grouped variables. J. R. Statist. Soc. B, 68, 49-67.

[2] 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.

Examples

1
2
3
4
5
6
7
                           
## 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)))

## End(Not run)

rqPen documentation built on May 30, 2017, 2:02 a.m.