Generates random sample sizes (N) by either sampling from a Negative Binomial or Poisson distribution.
random_N(K, method = "NegativeBinomial", mean = 15, min = 3, NB_size = 15)
Number of sample sizes to generate.
A string that defines what sampling distribution to generate
random N. The default is "NegativeBinomial"
but a "Poisson"
distribution can also be used.
The population mean (mu) if "NegativeBinomial"
, or the lambda
(dispersion parameter) if "Poisson"
. The default is 15, which will
generate sample sizes that on average will center around N = 15.
A non-negative integer that specifies the minimum sample size that can be generated. Default is N = 3.
Dispersion parameter for the "Negative Binomial"
distribution
that must be strictly positive, but need not be integer. Default is 15,
which creates a long tail for random N's ranging to about N = 60. Increase
value to create a longer tail of random sample sizes.
A vector of random sample sizes (N).