Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Producing random numbers from a kernel density


From   "Austin Nichols" <[email protected]>
To   [email protected]
Subject   Re: st: Producing random numbers from a kernel density
Date   Thu, 9 Mar 2006 10:03:50 -0500

If you have data you are thinking of running -kdensity- on, can you
just sample with replacement (-help bsample-) from the data?  Or is it
necessary for your problem to have a smooth pdf with no atoms,
estimated from the data, to draw the numbers from?

On 3/9/06, Stas Kolenikov <[email protected]> wrote:
Another popular method is by acceptance-rejection algorithm: <snip>

> On 3/9/06, Marcello Pagano <[email protected]> wrote:
> Depends how many numbers you want to generate, <snip>
>
> > Peter Willem� wrote:
> >
> > I am trying to draw random numbers from an arbitrary distribution. One
> > idea that occurred  to me was to use a kernel density estimator
> > (-kdensity-), but I have no idea how to produce random numbers from
> > the result. All suggestions are welcome.

*
*   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