Generate Random Vectors from a Poisson Sampling Model

Description

Generates random variables from a Poisson sampling model.

Usage

1
  rvpois(n=1, lambda)

Arguments

n

integer: number of variables to generate

lambda

a vector of (positive) mean parameters; (may be random)

Note

If any of the arguments are random, the resulting simulations may have non-Poisson marginal distributions.

Author(s)

Jouni Kerman jouni@kerman.com

References

Kerman, J. and Gelman, A. (2007). Manipulating and Summarizing Posterior Simulations Using Random Variable Objects. Statistics and Computing 17:3, 235-244.

See also vignette("rv").

Examples

1
2
3
  x <- rvpois(lambda=10)  # A Poisson rv with mean 10
  lbd <- rvchisq(1,1)     # Some positive rv
  y <- rvpois(lambda=lbd) # Not a Poisson rv, although each simulation is a draw from Poisson.

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.