Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.

# Re: st: Quantile regression: determine to which quantile an individual belongs

 From Alex Olssen To statalist@hsphsun2.harvard.edu Subject Re: st: Quantile regression: determine to which quantile an individual belongs Date Thu, 18 Apr 2013 21:20:31 +1000

I also am unclear on what you wish to achieve. You said that you wanted to know the quantile of each person's residual. I can suggest a way to calculate this, but I am unsure why you want it.
```
sysuse auto, clear
reg price length
predict res, res
sort res
gen quantile = round(_n/_N, 0.01)

Best,
Alex

On 18/04/13 9:12 PM, Nick Cox wrote:
```
```I can't see that "the quantile each individual belongs to" is a
well-defined concept.

Clearly you  can work out a percentile rank for each response, without
regard to the predictors. Or you can see where individual residuals
lie in the distribution of residuals.

But I don't think that either is what you are seeking.

I am not clear whether you are thinking of a point or an interval, but
that's secondary.

Stripping it down to a minimal example: We have a quantile regression
for weight versus height. I am a data point with a certain weight and
height. What quantile do I belong to? What's your definition?

Nick
njcoxstata@gmail.com

On 18 April 2013 11:50, Maria Juul Hansen <maria@lindely.dk> wrote:
```
```Dear Alex

Thank you for your comment and reference!
I am aware of the endogeneity problem. However, the purpose is not to
establish causal effects, just to control for the variables of interest.

Do you have any recommendations regarding the problem of identifying the
quantiles each individual belongs to?

Best regards,
Maria

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