Peter Harper wrote:
> Can tell me the commands to obtain a bottom and top quartile.
To which Thomas Trikalinos replied:
> tabstat variableName, stat(q)
> returns the p25, p50, p75 percentiles.
Another, and perhaps (slightly) simpler, solution is
. sum <var>, detail
which gives you all sorts of other sexy stuff about <var>. Thus:
. sysuse auto
(1978 Automobile Data)
. sum mpg, detail
Mileage (mpg)
-------------------------------------------------------------
Percentiles Smallest
1% 12 12
5% 14 12
10% 14 14 Obs 74
25% 18 14 Sum of Wgt. 74
50% 20 Mean 21.2973
Largest Std. Dev. 5.785503
75% 25 34
90% 29 35 Variance 33.47205
95% 34 35 Skewness .9487176
99% 41 41 Kurtosis 3.975005
CLIVE NICHOLAS |t: 0(044)191 222 5969
Politics |e: [email protected]
Newcastle University |http://www.ncl.ac.uk/geps
*
* 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/