[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: is there a syntax that inverts what -centile- does?

From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: is there a syntax that inverts what -centile- does?
Date   Mon, 14 Jan 2008 15:48:49 -0000

Strictly, the range referred to here is a range of probabilities, 
not that of the corresponding quantiles (values). 

[email protected] 

Austin Nichols replied to Yang Lu

If you read the FAQ at you would see that
this trick imposes symmetry on the extremes of the data.  Alternatives

by mi: g r=(srank-srank[1])/srank[_N] if mi==0
by mi: g r=(srank)/srank[_N] if mi==0

would have quantiles in a range [0,1-a] or [a,1] rather than

On Jan 11, 2008 6:11 PM, Yang Lu <[email protected]> wrote:
> Thank you, Austin, the code is very helpful.
> One more question (though trivial):
> When calculating the rank, you wrote
> > by mi: g r=(srank-srank[1]/2)/srank[_N] if mi==0
> I noticed that you divided the first srank value by 2 so that the
> percentile for the first obs (with lowest bmi) won't be zero. I'm
> wondering if this is a standard formula, and if not, why can't we just
> write
> by mi: g r=srank/srank[_N] if mi==0
*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index