rpoisBCD | R Documentation |
Generates random samples from a bivariate Poisson distribution (BPD).
rpoisBCD(n, lambda1, lambda2, lambda3, seed = 123)
n |
number of samples to generate |
lambda1 |
rate parameter for |
lambda2 |
rate parameter for |
lambda3 |
dependence parameter that must be (0, 1] |
seed |
seed for random number generation (default = 123) |
A data frame with columns 'X' and 'Y', containing the sampled values.
samples <- rpoisBCD(n = 100, lambda1 = 0.5, lambda2 = 0.5, lambda3 = 0.5)
cor(samples$X, samples$Y) # Should be negative
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.