Learn R Programming

rqPen (version 2.3)

coef.cv.rq.pen: Penalized Quantile Regression Coefficients

Description

Returns coefficients for a cv.rq.pen object with default values being coefficients associated with minimum cross-validation value.

Usage

# S3 method for cv.rq.pen
coef(object, lambda='min',...)

Value

Coefficients for selected value of lambda.

Arguments

object

cv.rq.pen object

lambda

Tuning parameter lambda. Default is to select minimum lambda from cross-validation method. User can also select a specific value of lambda, but it needs to be a lambda that was part of the fit of cv.rq.pen object.

...

Additional arguments, currently not used.

Author

Ben Sherwood

Examples

Run this code
x <- matrix(rnorm(100),nrow=20)
y <- 1 + x[,1] - 3*x[,5] + rnorm(20)
cv_model <- cv.rq.pen(x,y)
coefficients(cv_model)

Run the code above in your browser using DataLab