/ Home
S-Archive Download Script
trunpois   Truncated Poisson Distribution
DESCRIPTION
Random number generation for the truncated Poisson distribution.
 
USAGE
rtrunpois(n, lambda = stop("no lambda arg"), origin=0)
 
REQUIRED ARGUMENTS
n   sample size. If length(n) is larger than 1, then length(n) random values are returned.
lambda   vector of (positive) means. This is replicated to be the same length as the number of deviates generated.
 
OPTIONAL ARGUMENTS
origin   Non-negative integer giving the origin of the distribution.
 
VALUE
Vector of length n of random deviates from the Poisson distribution with mean lambda truncated to have minimum value origin.
 
SIDE EFFECTS
Causes creation of the dataset .Random.seed if it does not already exist, otherwise its value is updated.
 
EXAMPLES
> rtrunpois(10,5,4)
[1] 7 6 6 6 5 4 5 7 9 4

 

S-Archive Download Script

Gordon Smyth. Copyright © 1996-2016. Last modified: 10 February 2004