Prediction from a quantile regression penalized model

Share:

Description

Returns predicted values from "rq.pen" object for "newx" covariates.

Usage

1
2
## S3 method for class 'rq.pen'
predict(object, newx,...)

Arguments

object

rq.pen object.

newx

Matrix of covariates used for prediction.

...

Needed for consistency with generic predict.

Value

Returns predicted values from the model.

Author(s)

Ben Sherwood

Examples

1
2
3
4
5
x <- matrix(rnorm(800),nrow=100)
y <- 1 + x[,1] - 3*x[,5] + rnorm(100)
lassoModel <- rq.lasso.fit(x,y,lambda=1)
n2 <- matrix(rnorm(80),nrow=10)
preds <- predict(lassoModel,n2)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.