LogoLogo
JHU-IDDCOVID-19 Scenario Modeling hubCOVID-19 Forecast Hub
  • Home
  • 🦠gempyor: modeling infectious disease dynamics
    • Modeling infectious disease dynamics
    • Model Implementation
      • flepiMoP's configuration file
      • Specifying population structure
      • Specifying compartmental model
      • Specifying initial conditions
      • Specifying seeding
      • Specifying observational model
      • Distributions
      • Specifying time-varying parameter modifications
      • Other configuration options
      • Code structure
    • Model Output
  • 📈Model Inference
    • Inference Description
    • Inference Implementation
      • Specifying data source and fitted variables
      • (OLD) Configuration options
      • (OLD) Configuration setup
      • Code structure
    • Inference Model Output
    • Inference with EMCEE
  • 🖥️More
    • Setting up the model and post-processing
      • Config writer
      • Diagnostic plotting scripts
      • Create a post-processing script
      • Reporting
    • Advanced
      • File descriptions
      • Numerical methods
      • Additional parameter options
      • Swapping model modules
      • Using plug-ins 🧩[experimental]
  • 🛠️How To Run
    • Before any run
    • Quick Start Guide
    • Multiple Configuration Files
    • Synchronizing Files
    • Advanced run guides
      • Running with Docker locally 🛳
      • Running locally in a conda environment 🐍
      • Running on AWS 🌳
      • Running On A HPC With Slurm
    • Common errors
    • Useful commands
    • Tips, tricks, FAQ
  • 🗜️Development
    • Git and GitHub Usage
    • Guidelines for contributors
  • Deprecated pages
    • Module specification
  • JHU Internal
    • US specific How to Run
      • Running with Docker locally (outdated/US specific) 🛳
      • Running on Rockfish/MARCC - JHU 🪨🐠
      • Running with docker on AWS - OLD probably outdated
        • Provisioning AWS EC2 instance
        • AWS Submission Instructions: Influenza
        • AWS Submission Instructions: COVID-19
      • Running with RStudio Server on AWS EC2
    • Inference scratch
Powered by GitBook
On this page
  • inference settings
  • f
  • inference::statistics options
  • required options
  • f
  • optional options ?
  • inference::hierarchical_stats_geo
  • inference::priors
  • Ground truth data
Edit on GitHub
Export as PDF
  1. Model Inference
  2. Inference Implementation

Specifying data source and fitted variables

inference settings

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

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

f

inference::statistics options

required options

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.

Item
Required?
Type/Format
Description

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.

f

optional options ?

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.

Item
Required?
Type/Format

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"

inference::priors

It is now possible to specify prior values for inferred parameters. This will have the effect of speeding up model convergence.

Item
Required?
Type/Format

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

Ground truth data

name

module

geo_group_col

transform

inference:::priors

inference::

PreviousInference ImplementationNext(OLD) Configuration options

Last updated 7 months ago

Integer 1

📈
≥\geq≥