Take the 2-minute tour ×
Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It's 100% free, no registration required.

Following on my question for OLS, I wonder: what diagnostic plots exists for quantile regression? (and are there R implementation of them?)

A quick google search already came up with the worm plot (which I have never heard about before), and I'd be happy to know of more methods you might know about. (are any of them one from OLS ported for quantile-regression?)

Thanks

share|improve this question

2 Answers 2

up vote 8 down vote accepted

Quantile regression does not make distributional assumptions, i.e., assumptions about residuals, other than assuming that the response variable is almost continuous. If you are addressing the problem of estimating a single quantile as a function predictors X, far and away the major things that can go wrong are misspecification of the linear predictor $X\beta$ by underfitting, i.e., failing to include nonlinear effects (a common problem) or interaction effects. There are at least two recommended approaches. First, if your sample size is large, just fit a more flexible model. A good compromise is to allow all main effects to be nonlinear using regression splines such as restricted cubic splines (natural splines). Then there is nothing that needs to be checked except for interactions. The second approach is to hope that the model is simple (why?) but allow it to be complex, then to assess the impact of the complex additions to the simple model. For example, we can assess the combined contributions of nonlinear or interaction terms or both. An example follows, using the R rms and quantreg packages. A compromise interaction form is used, to limit the number of parameters. The interactions are restricted to not be doubly nonlinear.

require(rms)
# Estimate 25th percentile of y as a function of x1 and x2
f <- Rq(y ~ rcs(x1, 4) + rcs(x2, 4) + rcs(x1, 4) %ia% rcs(x2, 4), tau=.25)
# rcs = restricted cubic spline, here with 4 default knots
# %ia% = restricted interaction
# To use general interactions (all cross product terms), use:
# f <- Rq(y ~ rcs(x1, 4)*rcs(x2, 4), tau=.25)
anova(f)   # get automatic combined 'chunk' tests: nonlinearity, interaction
# anova also provides the combined test of complexity (nonlin. + interact.)
share|improve this answer

I presume you found the gamlss library has an implementation of the worm plot.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.