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

Re: st: obtaining specific percentiles of simulated distribution


From   Ed Blackburne III <[email protected]>
To   [email protected]
Subject   Re: st: obtaining specific percentiles of simulated distribution
Date   Sun, 28 Aug 2005 22:57:04 -0500 (CDT)

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/



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