com_sampler {MultRegCMP} | R Documentation |
Rejection Sampler - COM-Poisson
Description
Sampler for the Conway-Maxwell-Poisson as described in Algorithm 2 - Benson & Friel (2021)
Usage
com_sampler(mu, nu, n = 1, ndraws = FALSE)
Arguments
mu |
Location parameter |
nu |
Shape parameter |
n |
Number of draws (default = 1) |
ndraws |
Optional: Return the number of draws required to generate the n samples. |
Value
A list or numeric in case ndraws = FALSE:
sample |
Values sampled from the distribution |
drawsa |
Number of draws required in the rejection sampler |
log_Bf |
Log of the boundary of the rejection sampler |
Examples
com_sampler(2, 0.2, n = 10, ndraws = TRUE)
com_sampler(1, 2)
[Package MultRegCMP version 0.1.0 Index]