[R] Sampling

Thomas Lumley tlumley at u.washington.edu
Thu Feb 7 21:30:30 CET 2008


On Thu, 7 Feb 2008, Tim Hesterberg wrote:
> Thomas Lumley wrote:
>> Now, it might be useful to add another replace=FALSE sampler to sample(),
>> such as the newish Conditional Poisson Sampler based on the work of
>> S.X.Chen.  This does give correct marginal probabilities of inclusion, and
>> the pairwise joint probabilities are not too hard to compute.
>
> That could be interesting.  The pairwise joint probabilities are
> important in some applications.  Are all the pairwise joint
> probabilities nonzero (when size*prob allows that)?
>

Yes.

> Note that any algorithm for sampling without replacement can be
> extended to sampling with minimal replacement, by first drawing
> observations using the integer part of (size*prob), then reducing size
> and adjusting prob prior to random drawing.

Certainly -- the difficult part is sampling without replacement.

 	-thomas

Thomas Lumley			Assoc. Professor, Biostatistics
tlumley at u.washington.edu	University of Washington, Seattle



More information about the R-help mailing list