Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: RE: Percentiles: Identify of smallest observation closetto percentile value


From   Rod Hunter <[email protected]>
To   [email protected]
Subject   Re: st: RE: Percentiles: Identify of smallest observation closetto percentile value
Date   Mon, 03 Feb 2003 21:41:47 +1100

Thanks for responding Nick.

A simple eg. will suffice.

Obs. Var1
----------
1 10
2 9
3 8
4 7
-----------

I would like Stata to tell me the value of the observation that is at or below the 75th percentile point, and to yield the identity (or identities) of the observation(s).


Rod Hunter


Nick Cox wrote:

Rod Hunter


I would be grateful if a StataList member could tell me how I can
efficiently indentify the observation that is the smallest
observation
closest to a percentile value? Similarly, how can I generate a new
variable that is the smallest observation closest to the percentile?

There is some fuzziness about this problem because of the possibility
of ties. But even when there is a unique answer, do you want
to put a single value into a variable?

It might help if you were to use a commonly accessible data
set -- e.g. the auto data -- to give examples of what you
want to do.

Nick
[email protected]

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/




*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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