# st: RE: Quantile regression with stata

 From "Nick Cox" To Subject st: RE: Quantile regression with stata Date Fri, 20 Feb 2009 12:51:04 -0000

```Some further comments embedded below.

Nick
n.j.cox@durham.ac.uk

Tomas M

I am using quantile regression to model the 50th percentile for my data.
Unfortunately, the resources are limited on qreg when comparing to the
literature available for traditional regression models.

Questions:

1.  I am mainly focused on the 50th percentile.  But, if I wanted to
compare 25th and 75th models (using the sreg with q(0.25 0.50 0.75)
option), I am wondering if it is better to use the same set of
predictors for each percentile, or if I should use a different set of
percentile may have a different set of significant predictors (for
example, age may be significant for the 50th percentile, but not
significant for the 25th percentile).  Thus, is it better to compare
models for 25th 50th and 75th percentiles using the best fitted model
with all relevant significant predictors?

>>> This is general modelling strategy and not specific to -qreg-. If
you were say a graduate student of mine I'd personally rather see the
same set of predictors being used in all models to be compared.
Otherwise it's a matter of speculation how predictors left out of a
model would have performed if included. I don't see that a model need
include only predictors individually declared significant: that's
putting more reliance on the machinery than is deserved. However, I
would have no objection to also seeing slimmed down models. Other styles
and tastes prevail too.

2.  My other question pertains to interpretation of coefficients.  When
I run a model with certain predictors, sometimes I get a very small
coefficient (i.e. 5e-15).  How do I interpret this, and what does this
mean?  I do notice that this disappears once I collapse the categories
for the predictor.

>>> As above. It means as much or as little as it says. Without further
evidence, it looks small, but all depends on what the units of
measurement are and on looking at t-statistics as well and on
considering what else in the model. If some categorical variable is
represented by a bunch of indicators there is a very good case for
keeping them all even if some aren't significant.

3. What tools are available to assess goodness of fit for my qreg model?
I have read through the qreg postestimation commands for stata, and it
seems that linktest, and predict would be my only options (i.e. plots of
residuals versus fitted values are available).  I have also looked
through the UCLA regression with stata web book section on quantile
regression, and it also states that there are limited postestimation
commands available.

>>> That is part illusion. You need not be restricted to canned
commands. Indeed if you can get residuals and fitted you can get many
other things too. Note that the -modeldiag- package (-search- for
locations) includes several graphical commands that both make sense and
work after -qreg-.

4.  This final question relates to question 3.  What would be the best
method for variable selection for my final model?  Still would be
backwards elimination?  How would I do this in stata, given the limited
variables in my model, then eliminate ones with p-value greater than
0.05 (or add ones with p-value less than 0.05 if I were to add stepwise
procedures too)?

>>> The usual meta-comment is now that you won't get much support for
any flavour of stepwise on this list. Search the list archives for
"stepwise" and "Frank Harrell" for more.

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
```