rvpois {rv} | R Documentation |
Generates random variables from a Poisson sampling model.
rvpois(n=1, lambda)
n |
integer: number of variables to generate |
lambda |
a vector of (positive) mean parameters; (may be random) |
If any of the arguments are random, the resulting simulations may have non-Poisson marginal distributions.
Jouni Kerman kerman@stat.columbia.edu http://www.stat.columbia.edu/~kerman
Kerman, Jouni and Gelman, Andrew. Manipulating and Summarizing Posterior Simulations Using Random Variable Objects. Technical report, Columbia University, New York.
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.