Create a list of offspring distributions to run the ringbp model
Arguments
- community
 a
function: a random number generatingfunctionthat samples from the community (non-isolated) offspring distribution, thefunctionaccepts a singleintegerargument specifying the number of times to sample the offspring distribution (i.e. the length of thefunctionoutput)- isolated
 a
function: a random number generatingfunctionthat samples from the isolated cases offspring distribution, thefunctionaccepts a singleintegerargument specifying the number of times to sample the offspring distribution (i.e. the length of thefunctionoutput)- asymptomatic
 a
function: a random number generatingfunctionthat samples from the sub-clinical non-isolated cases offspring distribution, thefunctionaccepts a singleintegerargument specifying the number of times to sample the offspring distribution (i.e. the length of thefunctionoutput). Will be specified as the same as thecommunityoffspring distribution if left unspecified
Details
If asymptomatic is not provided it will be specified as the same as
community meaning transmission of subclinical cases to be equal to
clinical cases unless specified otherwise.
Examples
# Negative binomial offspring distributions with:
# Community R0 of 2.5 and dispersion of 0.16
# Isolated R0 of 0.5 and dispersion of 1
# Asymptomatic R0 of 2.5 and dispersion of 0.16
offspring_opts(
  community = \(n) rnbinom(n = n, mu = 2.5, size = 0.16),
  isolated = \(n) rnbinom(n = n, mu = 0.5, size = 1),
  asymptomatic = \(n) rnbinom(n = n, mu = 2.5, size = 0.16)
)
#> $community
#> function (n) 
#> rnbinom(n = n, mu = 2.5, size = 0.16)
#> <environment: 0x55ac1f791ed8>
#> 
#> $isolated
#> function (n) 
#> rnbinom(n = n, mu = 0.5, size = 1)
#> <environment: 0x55ac1f791ed8>
#> 
#> $asymptomatic
#> function (n) 
#> rnbinom(n = n, mu = 2.5, size = 0.16)
#> <environment: 0x55ac1f791ed8>
#> 
#> attr(,"class")
#> [1] "ringbp_offspring_opts"