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

st: RE: percentiles


From   "DL Millimet" <millimet@post.cis.smu.edu>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: percentiles
Date   Fri, 11 Oct 2002 10:52:57 -0500

i ran across something similar.  the solution i found was to first sort the
data by age, then
run the pctile commands, then sort the data by pctAge.  then list it and see
what happens.
also, be sure to look at the -nq- option of pctile to make sure you are
finding the number
of percentiles you want.

dann

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu]On Behalf Of Don Spady
Sent: Friday, October 11, 2002 10:46 AM
To: statalist@hsphsun2.harvard.edu
Subject: st: percentiles


Dear all
  I am trying to use the command "pctile" to get percentiles of the values
in a variable.  The values are individual ages.
I have used the commands:
pctile  pct=age
pctile pct=age, genp(pctAge)
but when I run it and then list the first 10 instances I get

. list pct age in 1/10

           pct       age
  1.         9        14
  2.         .        17
  3.         .         1
  4.         .        14
  5.         .         5
  6.         .        12
  7.         .        14
  8.         .         7
  9.         .         9
 10.         .         0

The ages run from 0 to 17 and are fairly evenly distributed.
?? Why don't I get any values in the pct column and what does the '9' mean.
Many thanks for any help.


Donald Spady
Dep't of Pediatrics, University of Alberta
(780) 407-1244

Nature has no reset button.


*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index