# Finding predictors of upper level of a variable

I am analyzing data on a health variable and its relation to age, gender, height etc. I am more interested in 90th percentile of the health variable, which can be called upper limit of 'normal'. How will this analysis be different from regular analysis where one is trying to find out factors predicting the value of health variable?

• Would extreme value theory apply here? Dec 11, 2014 at 15:15
• Will extreme value theory be better than quantile regression? What are the basic steps to do it in R? If you an post a more detailed answer, it will be much appreciated.
– rnso
Dec 11, 2014 at 16:49
• It's not better, it's different in that it only looks at the tail. Dec 11, 2014 at 16:50

It sounds like you're seeking quantile regression.

In practice this works rather like ordinary regression except that you fit one or more conditional quantiles (which are assumed linear in predictors) rather than the conditional mean.

Parameter estimation involves finding the $\hat{\beta}_\tau$ minimizing $\sum_{i=1}^{n}\rho_{\tau}(Y_{i}-X\beta)$, where $\rho_{\tau}(y)=|y(\tau-\mathbf{I}_{(y<0)})|$ and $\tau$ is the desired quantile.

http://en.wikipedia.org/wiki/Quantile_regression

This minimization problem can be cast as a linear programming problem, for which a number of algorithms exist.

There are numerous questions and answers here relating to quantile regression.

Here's a small example (with a single quantile, the 90th percentile), done in R:

 library(quantreg)
carsfit<- rq(dist~speed,tau=.9,data=cars)
plot(dist~speed,cars)
lines(carsfit$fitted~cars$speed,col=2)


and as with ordinary regression you can get summary output as well, but for coefficients you get an interval rather than a standard error:

> summary(carsfit)

Call: rq(formula = dist ~ speed, tau = 0.9, data = cars)

tau: [1] 0.9

Coefficients:
coefficients lower bd  upper bd
(Intercept)  -8.85714    -19.13570  40.37029
speed         4.71429      3.46632   5.83520
Warning message:
In rq.fit.br(x, y, tau = tau, ci = TRUE, ...) : Solution may be nonunique


(Normally you'd want a lot more data than this to try to estimate a high quantile.)

I'm barely touching on the details and capabilities of quantile regression here; you might find this vignette of use, even if you don't use R to perform quantile regression.

• Thanks for a well illustrated explanation. I can use R. Do you expect major difference in predictors for mean value (determined by usual multiple regression) as compared to predictors for 90th percentile using quantile regression with quantreg package?
– rnso
Dec 11, 2014 at 16:12
• When you say "difference in predictors" are you talking about differences in parameter estimates or are you implying that you're doing model selection in some fashion? In any case it would depend on many things; there's not much to say in a short space. If the first, in practice, ordinary regression assumptions often don't quite hold and two different quantiles can produce quite different slopes (such as when there's heteroskedasticity), so in that case they couldn't both be parallel to the line for the mean. If all assumptions for both hold, then with a lot of data the estimates ...(ctd) Dec 11, 2014 at 16:18
• (ctd)... may be similar, aside from the intercept of course. Dec 11, 2014 at 16:22
• Yes, I am trying to create a model for 90th percentile of a data set (N about 8000) on a health variable with predictors: age, gender, height, weight, waist, city and season. Will "rq(yvar~., tau=.9, data=mydata)" be reasonable?
– rnso
Dec 11, 2014 at 16:43
• Well, the command should run, since it looks like legitimate syntax, but I can't speak to model suitability on the limited information I have here. If the model is okay (linearity in conditional quantiles, for example), that sample size should at least be able to support the modest number of predictors and the reasonably high-tail quantile. Dec 11, 2014 at 22:03