rpoisod: Internal function to generate random numbers following...

View source: R/internal_functions.R

rpoisodR Documentation

Internal function to generate random numbers following over-dispersed Poisson distribution based on simple cheat of using a standard negative binomial, but choosing the scale parameter to give the desired mean vs variance ratio at the given value of the mean. Taken from: https://stat.ethz.ch/pipermail/r-help/2002-June/022425.html

Description

Internal function to generate random numbers following over-dispersed Poisson distribution based on simple cheat of using a standard negative binomial, but choosing the scale parameter to give the desired mean vs variance ratio at the given value of the mean. Taken from: https://stat.ethz.ch/pipermail/r-help/2002-June/022425.html

Usage

rpoisod(n, lambda, d = 1)

Arguments

n

integer. Number of observations.

lambda

numeric. Mean.

d

numeric. Dispersion parameter.

Value

a vector with the simulated sample.


collin documentation built on Sept. 19, 2023, 5:06 p.m.