An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20110516/962b85ef/attachment.pl>
simulation from truncated poisson
5 messages · Greg Snow, cassie jones
Which direction is it truncated? (only values less than a allowed or only greater?). One simple approach is rejection sampling, just generate from a regular poisson distribution, then throw away any values in the truncated region. Another approach if the legal values are those from 0 to a, so that there is a finite number of possibilities, then you can use the sample function with replace=TRUE and using probabilities from the poisson in the legal range. -----Original Message----- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of cassie jones Sent: Monday, May 16, 2011 5:28 PM To: r-help at r-project.org Subject: [R] simulation from truncated poisson Dear all, I need to simulate values from a Poisson distribution which is truncated at certain value 'a'. Can anyone tell me if there is in-built package in R which can simulate from a truncated Poisson? If not, what should be the steps to write a function which would do that? Thanks in advance. Cassie ______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20110516/c5a5f2e3/attachment.pl>
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20110516/d7cd86a5/attachment.pl>
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20110517/2d9301ec/attachment.pl>