powered by
Linear programming implementation of quantile regression with a group penalty.
rq.group.lin.prog(x,y,groups,tau,lambda,intercept=TRUE,eps=1e-05, penalty="SCAD", a=3.7, coef.cutoff=1e-08, initial_beta=NULL, iterations=10,converge_criteria=.0001,penGroups=NULL,...)
Returns the following:
Coefficients of the model.
Residuals from the fitted model.
Unpenalized portion of the objective function.
Quantile being modelled.
Sample size.
Whether intercept was included in model.
Penalty used for fitting the model.
rqPen and rqNC
Matrix of predictors.
Vector of response values.
Vector assigning columns of x to groups.
Conditional quantile being modelled.
Vector of lambdas. Default is for lambdas to be automatically generated.
Whether model should include an intercept. Constant does not need to be included in "x".
Multiplier for smallest lambda.
Type of penalty: "LASSO", "SCAD" or "MCP".
Additional parameter for non-convex penalties.
Estimates below this value are set to zero.
Initial beta estimate.
Maximum number of iterations.
Convergence criteria
Specify which groups will be penalized. Default is to penalize all groups.
Additional arguments to be sent to rq.lasso.fit.
Ben Sherwood
if (FALSE) { x <- matrix(rnorm(800),nrow=100) y <- 1 + x[,1] - 3*x[,5] + rnorm(100) cv_model <- rq.group.lin.prog(x,y,groups=c(rep(1,4),rep(2,4)), tau=.5, lambda=1) }
Run the code above in your browser using DataLab