[R] multivariate sampling question again

Prof Brian D Ripley ripley at stats.ox.ac.uk
Mon Feb 17 18:02:02 CET 2003


R-devel already contains rmultinom.

I don't see why rejection sampling on (m, n) should be slow unless m-n is
very small or far out in the tails, in which case why do you want this?
In any case, inversion will be a perfectly adequate method as you have
pbeta and qbeta.

On Mon, 17 Feb 2003, Peng Zhang wrote:

> Dr. Bolker
>
> I just wrote it yesterday. Thank you anyway. However do you have some
> ideas about sampling from restricted beta distribution. say from beta(a,
> b) but value between m and n. Now I generate lots of samples from beta(a,
> b) and then choose value between m and n, but it is very time-consuming.
> Do you have some good ideas? Thanks again!

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list