Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: Generate Random Variable Given Percentile Values


From   wgould@stata.com (William Gould, StataCorp LP)
To   statalist@hsphsun2.harvard.edu
Subject   st: RE: Generate Random Variable Given Percentile Values
Date   Tue, 17 Feb 2009 14:01:02 -0600

Peter Graven asked about generating random values from percentiles, 
I offered a program, and I now see that Nick Cox <n.j.cox@durham.ac.uk>
had already written, 

> These percentiles presumably came from somewhere. Why not sample from
> the dataset that produced them? 

I wholeheartedly agree.  If Peter has the data from which the percentiles
were calculated, resampling (sampling with replacement from the data)
is the way to go.  The relevant Stata command is -bsample-.

-- Bill
wgould@stata.com
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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