Learn R Programming

plaqr (version 2.0)

predictInt: Prediction Inteval for Quantile Regression

Description

Predicts future values using the median and finds a prediction interval for future values using an upper and lower quantile. The lower quantile is (1-level)/2 and the upper quantile is .5 + level/2.

Usage

predictInt(fit, level=.95, newdata=NULL, ...)

Arguments

fit

a fitted model of class "plaqr" or "rq" to be used for prediction.

level

the prediction level required. The lower quantile is (1-level)/2 and the upper quantile is .5 + level/2.

newdata

an optional data frame in which to look for variables with which to predict. If omitted, the fitted values are used.

...

additional argument(s) for methods.

Value

a matrix with columns giving the predicted median and lower and upper prediction bounds.

Examples

Run this code
# NOT RUN {
data(simData)
fit <- plaqr(y~.,~z1+z2,data=simData)
predictInt(fit, level=.95)
# }

Run the code above in your browser using DataLab