[R] Help!!
Roger Koenker
roger at ysidro.econ.uiuc.edu
Wed Jan 29 16:30:07 CET 2003
If you have a dominating density, ie another density, say g, such that cg(x)<f(x) for
some c<oo and all x, then you can easily do this by rejection. See, e.g. Luc Devroye's
Springer book, which is the bible on this sort of thing....
url: www.econ.uiuc.edu Roger Koenker Dept. of Economics UCL,
email rkoenker at uiuc.edu Department of Economics Drayton House,
vox: 217-333-4558 University of Illinois 30 Gorden St,
fax: 217-244-6678 Champaign, IL 61820 London,WC1H 0AX, UK
vox: 020-7679-5838
On Wed, 29 Jan 2003, Duncan Murdoch wrote:
> On Tue, 28 Jan 2003 16:01:06 +0000, you wrote in message
> <F171eRaNgEpTX5V3Gyk00000356 at hotmail.com>:
>
> >
> >Dear R ers, if some can tel me how I can generate a sample from a given
> >density. I have a complex 2D density function en I want to genearte
> >a sample from it? Any package?
More information about the R-help
mailing list