Specifying data source and fitted variables
Last updated
Last updated
iterations_per_slot
do_inference
gt_data_path
With inference model runs, the number of simulations nsimulations
refers to the number of final model simulations that will be produced. The filtering$simulations_per_slot
setting refers to the number of iterative simulations that will be run in order to produce a single final simulation (i.e., number of simulations in a single MCMC chain).
Item | Required? | Type/Format | Description |
---|---|---|---|
f
name
aggregator
period
sim_var
data_var
likelihood
The statistics specified here are used to calibrate the model to empirical data. If multiple statistics are specified, this inference is performed jointly and they are weighted in the likelihood according to the number of data points and the variance of the proposal distribution.
f
remove_na
add_one
gt_start_date
gt_end_date
Optional sections
inference::hierarchical_stats_geo
The hierarchical settings specified here are used to group the inference of certain parameters together (similar to inference in "hierarchical" or "fixed/group effects" models). For example, users may desire to group all counties in a given state because they are geograhically proximate and impacted by the same statewide policies. The effect should be to make these inferred parameters follow a normal distribution and to observe shrinkage among the variance in these grouped estimates.
inference::priors
It is now possible to specify prior values for inferred parameters. This will have the effect of speeding up model convergence.
name
module
geo_group_col
transform
inference:::priors
inference::
Item | Required? | Type/Format | Description |
---|---|---|---|
Item | Required? | Type/Format |
---|---|---|
Item | Required? | Type/Format |
---|---|---|
name
required
string
name of statistic, user defined
period
required
days
, weeks
, or months
Duration of time over which data and model output should be aggregated before being used in the likelihood. If weeks
, epiweeks
are used
aggregator
required
string, name of any R function
Function used to aggregate data over theperiod
, usually sum
or mean
sim_var
required
string
Name of the outcome variable - as defined inoutcomes
section of the config - that will be compared to data when calculating the likelihood. This will also be the column name of this variable in the hosp
files in the model_output
directory
data_var
required
string
Name of the data variable that will be compared to the model output variable when calculating the likelihood. This should be the name of a column in the
file specified in inference::gt_data_path
config option
remove_na
required
logical
if TRUE if FALSE
add_one
required
logical
if TRUE if FALSE Will be overwritten to TRUE if the likelihood distribution is chosen to be log
likelihood::dist
required
Distribution of the likelihood
likelihood::param
required
parameter value(s) for the likelihood distribution. These differ by distribution so check the code in inference/R/functions.R/logLikStat
function.
scenario name
required
name of hierarchical scenario, user defined
name
required
name of the estimated parameter that will be grouped (e.g., the NPI scenario name or a standardized, combined health outcome name like probability_incidI_incidC
)
module
required
name of the module where this parameter is estimated (important for finding the appropriate files)
geo_group_col
required
geodata column name that should be used to group parameter estimation
transform
required
type of transform that should be applied to the likelihood: "none" or "logit"
scenario name
required
name of prior scenario, user defined
name
required
name of NPI scenario or parameter that will have the prior
module
required
name of the module where this parameter is estimated
likelihood
required
specifies the distribution of the prior
iterations_per_slot
required
Number of iterations in a single MCMC inference chain
do_inference
required
TRUE/FALSE
TRUE if inference should be performed. If FALSE, just runs a single run per slot, without perturbing parameters
gt_data_path
required
file path
Path to files containing "ground truth" data to which model output will be compared
statistics
required
config subsection
Specifies details of how each model output variable will be compared to data during fitting. See inference::statistics section.
hierarchical_stats_geo
optional
config subsection
Specifies whether a hierarchical structure should be applied the likelihood function for any of the fitted parameters. See inference::hierarchical_stats_geo
for details.
priors
optional
config subsection
Specifies prior distributions on fitted parameters. See inference::priors
for details
Integer 1