Sampling of overdispersed Poisson data with constant overdispersion
Sampling of overdispersed Poisson data with constant overdispersion
rqpois() samples overdispersed Poisson data with constant overdispersion from the negative-binomial distribution such that the quasi-Poisson assumption is fulfilled. The following description of the sampling process is based on the parametrization used by Gsteiger et al. 2013.
rqpois(n, lambda, phi, offset =NULL)
Arguments
n: defines the number of clusters (I)
lambda: defines the overall Poisson mean (λ)
phi: dispersion parameter (Φ)
offset: defines the number of experimental units per cluster (ni)
Returns
a data.frame containing the sampled observations and the offsets
Details
It is assumed that the dispersion parameter (Φ) is constant for all i=1,...I clusters, such that the variance becomes
var(yi)=Φniλ
For the sampling κi is defined as
κi=(Φ−1)/(niλ)
where ai=1/κi and bi=1/(κiniλ). Then, the Poisson means for each cluster are sampled from the gamma distribution
λi∼Gamma(ai,bi)
and the observations per cluster are sampled to be
yi∼Pois(λi).
Please note, that the quasi-Poisson assumption is not in contradiction with the negative-binomial distribution, if the data structure is defined by the number of clusters only (which is the case here) and the offsets are all the same nh=nh´=n.
Gsteiger, S., Neuenschwander, B., Mercier, F. and Schmidli, H. (2013): Using historical control information for the design and analysis of clinical trials with overdispersed count data. Statistics in Medicine, 32: 3609-3622. tools:::Rd_expr_doi("10.1002/sim.5851")