
Create Dispersion Structure Specification
Source:R/smoothing_dispersion_structure.r
dispersion_structure.RdThis function creates a dispersion structure object that specifies priors
for the overdispersion parameter of the negative binomial likelihood for
the case timeseries. phi controls how much the observed counts vary
around the expected trend beyond Poisson noise: smaller values allow more
overdispersion (noisier counts relative to the mean), larger values
approach Poisson-like variance.
Arguments
- phi_mean
Numeric scalar specifying the prior mean for the negative binomial dispersion parameter. Must be positive. Optional - if not provided, no priors will be set.
- phi_sd
Numeric scalar specifying the prior standard deviation for the dispersion parameter. Must be positive. Optional - if not provided, no priors will be set.
Value
An object of class EpiStrainDynamics.dispersion containing:
- mean
The prior mean for phi
- sd
The prior standard deviation for phi
- priors_provided
Integer flag passed to the Stan model:
1if no priors were supplied (Stan's built-in default prior is used),2if priors were supplied (thephi_mean/phi_sdvalues are used as the prior)