Generate random numbers from a Gamma-Borel mixture distribution
Arguments
- n
Number of random variates to generate.
- size
The dispersion parameter (often called
kin ecological applications); A positive number.- prob
Probability of success (in the parameterisation with
prob, see alsoNegBinomial); A number between 0 and 1.- mu
Mean; A positive number.
- censor_at
A stopping criterion;
<numeric>. Defaults toInf. A value above which the simulation ends and the random number is set toInf(as a form of censoring).rborel()simulates chain sizes usingsimulate_chain_stats()with a Poisson offspring distribution, so ifmu >= 1, the simulation could proceed unendingly. This parameter is used to prevent this.
Examples
set.seed(32)
rgborel(n = 5, size = 0.3, mu = 1, censor_at = 5)
#> [1] 1 1 Inf Inf 1