50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

rqPen (version 3.2.2)

predict.rq.pen.seq.cv: Predictions from rq.pen.seq.cv object

Description

Predictions from rq.pen.seq.cv object

Usage

# S3 method for rq.pen.seq.cv
predict(
  object,
  newx,
  tau = NULL,
  septau = TRUE,
  cvmin = TRUE,
  useDefaults = TRUE,
  ...
)

Value

A matrix of predictions for each tau and a combination

Arguments

object

rq.pen.seq.cv object

newx

Matrix of predictors

tau

Quantile of interest. Default is NULL, which will return all quantiles. Should not be specified if modelsIndex is used.

septau

Whether tuning parameter should be optimized separately for each quantile.

cvmin

If TRUE then minimum error is used, if FALSE then one standard error rule is used.

useDefaults

Whether the default results are used. Set to FALSE if you you want to specify specific models and lambda values.

...

Additional parameters sent to coef.rq.pen.seq.cv().

Author

Ben Sherwood, ben.sherwood@ku.edu

Examples

Run this code
x <- matrix(runif(1600),ncol=8)
y <- 1 + x[,1] + x[,8] + (1+.5*x[,3])*rnorm(200)
m1 <- rq.pen.cv(x,y,penalty="ENet",a=c(0,.5,1),tau=c(.25,.75),lambda=c(.1,.05,.01))
newx <- matrix(runif(80),ncol=8)
cvpreds <- predict(m1,newx)

Run the code above in your browser using DataLab