com_sampler | R Documentation |
Sampler for the Conway-Maxwell-Poisson as described in Algorithm 2 - Benson & Friel (2021)
com_sampler(mu, nu, n = 1, ndraws = FALSE)
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. |
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 |
com_sampler(2, 0.2, n = 10, ndraws = TRUE)
com_sampler(1, 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.