Skip to content

Mathbiomed/Hist-D

Repository files navigation

Hist-D

This repository (Reproduce_Results) provides simulation data to reproduce the results shown in Figure3.

  1. Set the Reproduce_Results as the working directory.
  2. Inference in original simulation data (Fig. 3c ~ 3e).
    a. Run Figure3_cde.R file.
  3. Inference in simulation data with measurement errors (Fig. 3f ~ 3h).
    a. Run Figure3_fg.R and Figure3_h.R file.
  4. Inference in simulation data when transmission rate changes (Fig. 3i ~ 3k).
    a. Run Figure3_ijk.R file.

Packages to load

  • rstan: For constructing credible intervals of the estimates using the MCMC method.
  • coda: For convergence diagnostics of the MCMC chains.
  • ggplot2: For plotting the results.

Main functions

  • HistD_estimation(): Function to estimate the initial condition using the Hist-D method (See detailed options in supporting information). This function returns the estimated initial condition projected for the specified date.
  • HistD_stan(): Function to calculate the credible interval of the estimate using the MCMC method (See detailed options in supporting information). These results contain 50%, 75%, 95% credible interval of the initial condition and R hat for convergence diagnostics of the MCMC chains.

Simulation Data

You can construct the simulation SEIR data by delay differential equations (DDE) using the mean_trajectory_SEIR_original() function in the "SEIR_function.R" file.

Column Descriptions

  • day: Time point (date format) of the data (corresponding to 'Time (days)' in Fig. 3c–e).
  • f_S->E: Number of daily exposed individuals (shown in Fig. 3a).
  • f_E->I: Number of daily infectious individuals.
  • E: True value of E (as shown in Fig. 3c).

About

A user-friendly computational package, HistD (History-Dependent initial condition decision method), to implement the history-dependent estimation approach in R

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages