nbinom_constrained_min: Secondary case distribution with additional constraint on...

Description Usage Arguments Details Value

View source: R/parameterize.R

Description

This function draws secondary cases from a negative binomial distribution, but constrained to a maximum (max_secondaries), where R0 is the mean (mu in rnbinom) and k is the dispersion parameter (size in rnbinom). In addition, if a case is an introduction, secondaries are additionally constrained to a minimum (min_secondaries) number of cases. In general this serves as an example of how to customize functions using mget and a general template function of function(n, params) ....

Usage

1
2
3
4
nbinom_constrained_min(
  n,
  params = list(R0 = 1.2, k = 1, max_secodndaries = 100, min_secondaries = 1)
)

Arguments

n

number to draw

params

list of parameters

Details

Passed to the param secondary_fun in simrabid.

Value

integer vector, number of secondary cases, of length n


mrajeev08/simrabid documentation built on May 7, 2021, 11:47 a.m.