We agree on the main point.
But -round(whatever, 0.01)- is not an especially good idea because
most multiples of 0.01 can not be held exactly in binary and people
who don't understand that get into awkward small messes.
A more systematic approach is explained at
FAQ . . . . . . . . . . Calculating percentile ranks or plotting positions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . N. J. Cox
7/02 How can I calculate percentile ranks?
How can I calculate plotting positions?
http://www.stata.com/support/faqs/statistics/percentile-ranks-and-plotting-positions/
Nick
njcoxstata@gmail.com
On 18 April 2013 12:20, Alex Olssen <alex.olssen@gmail.com> wrote:
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)
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?
On 18 April 2013 11:50, Maria Juul Hansen <maria@lindely.dk> wrote:
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?
*
* 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/