Try _pctile
For syntax options, type help _pctile, but for your purposes I think that,
given a variable x, that
_pctile x, nq(1000)
will suffice.
The nq() option specifies the number of percentiles (up to a maximum of
1000).
After running _pctile, there you can type
ret li
to see list of returned percentiles. These may, of course, be referenced
in the normal way:
di r(25)
for example will display the 2.5 percentile for the command listed above.
Cheers,
Ed
> I have simulated (1000x) the t statistic from N(0,1) distribution of
> varying n.
> I wish to access values of t at percentiles 2.5 & 97.5 to assess how
> coverage varies with n.
> Whilst this the t distribution is symmetrical I plan to look at other
> statistics where this may not be so & as such don't want to rely on the
> 5th or 95th percentile.
> I have tried return(p) after summarize, however it only gives a limited
> number of choices.
> Any help would be appreciated
> thanks Richard Hiscock
>
>
> *
> * 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/
>
Edward F. Blackburne III, PhD
Associate Professor
Economics and International Business
Sam Houston State University
*
* 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/