6
$\begingroup$

I am new to quantile regression and most of the examples I see are in a multiple regression context with continuous predictors. I am analyzing a designed experiment and was wondering if quantile regression is still valid with only categorical predictors (eg 2 x 2 factorial ANOVA context).

$\endgroup$
4
  • 1
    $\begingroup$ How would you define 'quantile' in a categorical context? $\endgroup$
    – Wayne
    Nov 13, 2014 at 19:22
  • 1
    $\begingroup$ @Wayne: The response is continuous. $\endgroup$ Nov 14, 2014 at 10:41
  • 1
    $\begingroup$ @Scortchi: ah, my poor reading comprehension! So then the question boils down to "is it valid to use regression with only categorical predictors?" $\endgroup$
    – Wayne
    Nov 14, 2014 at 13:18
  • 1
    $\begingroup$ @Wayne: Yes, in a nut-shell. $\endgroup$ Nov 14, 2014 at 13:21

2 Answers 2

7
$\begingroup$

A quantile regression model establishes a relationship between the percentiles of a continuous outcome and a set of predictors.

In the simplest situation the outcome needs to be a continuous variable, but both categorical and continuous predictors can be included.

If you want to evaluate the impact of 2 dichotomous predictors on a specific percentile $p$ of $Y$, (which is the same situation of a two-way ANOVA), you can build the model $$Q_{Y|X=x}{(p)}=\beta_0(p)+\beta_1(p)x_1+\beta_2(p)x_2$$ where $\beta_1(p)$ and $\beta_2(p)$ express the change in the pth percentile of $Y$ associated with the dichotomous variables $x_1$ and $x_2$, respectively

$\endgroup$
2
  • $\begingroup$ Fabulous! Any recommendations for papers/books with gentle/intuitive intros to Quantile regression? Ones with sample data would be very helpful. $\endgroup$
    – N Brouwer
    Nov 16, 2014 at 16:16
  • $\begingroup$ This is a recent very simple introduction: aje.oxfordjournals.org/content/early/2014/07/02/aje.kwu178 Further references are included $\endgroup$
    – andbel
    Nov 17, 2014 at 8:35
2
$\begingroup$

Binary predictors (eg male vs female) and categorical variables (color) can enter into quantile regression alone or in combination with continuous predictors. Anything you can do in multiple regression, ANOVA or ANCOVA -- that is, any general linear model (GLM) -- should work with quantile regression.

Petscher and Logan (2014) provide a wonderful intro, explicitly discussing how to interpret the results of quantile regression with a single continuous predictor, with a single binary predictor, and with both. They also discuss an application to longitudinal research. They compare all quantile regression results to standard regression.

With regard to interpreting quantile regression coefficients, they note "While linear regression posits the question 'What is the relation between X and Y?' quantile regression extends this to, 'For whom does a relation between X and Y exist' as well as testing for whom a relation is stronger or weaker" (pg 864, emphasis added).

Gaining intuition for quantile regression can take practice. The introductions associated with software in R are very useful; this short post also provides some insights.

Software notes: The lqmm package in R provides facilities for quantile regressions with random effects and quantile Poisson regression. As is generally applicable for random effects/hierarchical models, lqmm is better behaved if you center continuous predictors. Koencker's quantreg package in R, which has a nice vignette, handles independent data and has facilities for non-linear quantile (nlrq) models and "non-parameteric quantile smoothing" which looks to be similar to traditional smoothing/GAM methods.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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