powered by
Provides a size n sample from the Conway-Maxwell-Poisson distribution with parameters lam and nu. Sampling is done via a simple multinomial approach.
lam
nu
rcomp(n, lam, nu, sumTo = 100L)
an integer of the number of random samples to be taken.
a double of the parameter \(\lambda\).
a double of the parameter \(\nu\).
an integer for the summation term in the density (default 100).
A random sample of size n.
The function is only implemented for single values of lam and nu. See dcomp for details of the PDF.
dcomp
# NOT RUN { require(graphics) sample <- rcomp(1000, 8.5, 0.9) barplot(table(sample)) # }
Run the code above in your browser using DataLab