Quantile regression in R

Lazar

Phineas Packard
#1
Hi All,

Long time since I have been on. New forum look is quite nice.

So I have been doing a set of quantile regression models using the QuantReg package. I have two questions in this regard:

1. I have clustered data, is there a pre-existing function to implement block bootstrapping in this regrard. I know the boot package has block bootstrapping for time series but this is not quite what I want.

2. Can you sequence along one of the predictors (in my case school achievement) rather than along the outcome variable (in my case a psychological outcome). If so does anyone know of an R package that does this?
 

jpkelley

TS Contributor
#2
Hi Lazar,
I hadn't heard of quantreg, so I reviewed its vignette. I'm guessing that your dilemma is that the package doesn't include a mixed-effect framework? Is this what you mean when you say that you want to account for clustering in your data?

If this is the case, I've been attempting to generate prediction intervals of GAMM models by combining the model's residual variance and the error term variance and then generating quantiles of the response variable across the range of my predictor. This is a roundabout way of doing it, but this mixed-effects framework might be what you're trying to get at.

I'm unclear about your second question. When speaking of sequencing along one of your predictors, are you effectively talking about switching the dependent/independent? I can think of at least one R package that allows x prediction from y, but I'm not sure about prediction/confidence intervals, etc.
 

Lazar

Phineas Packard
#3
Hi Lazar,
I hadn't heard of quantreg, so I reviewed its vignette. I'm guessing that your dilemma is that the package doesn't include a mixed-effect framework? Is this what you mean when you say that you want to account for clustering in your data?

If this is the case, I've been attempting to generate prediction intervals of GAMM models by combining the model's residual variance and the error term variance and then generating quantiles of the response variable across the range of my predictor. This is a roundabout way of doing it, but this mixed-effects framework might be what you're trying to get at.
Yes quantreg does not have a mixed-effect framework. Your approach seems interesting. For my mind, though, block bootstrapping (the block being the second level of schools) seems the simplest approach to getting corrected standard errors. I might end up trying both approaches.

I'm unclear about your second question. When speaking of sequencing along one of your predictors, are you effectively talking about switching the dependent/independent? I can think of at least one R package that allows x prediction from y, but I'm not sure about prediction/confidence intervals, etc.
I had the idea of not so much running quantile regression but regression on a particular set of the quantile of one of the predictors. My interest is whether the effect of a second predictor differs within the quantiles derived from the first predictor. I was interested to know if anyone had done this and if so, is there something for it in R already.

Thanks for the comments!!!
 
Last edited:

jpkelley

TS Contributor
#4
I had the idea of not so much running quantile regression but regression on a particular set of the quantile of one of the predictors. My interest is whether the effect of a second predictor differs within the quantiles derived from the first predictor. I was interested to know if anyone had done this and if so, is there something for it in R already.
Ah, I see. This is an interesting idea. I honestly haven't heard of this framework before. This is definitely way outside of what little experience I have.