Citation: Tam J, Mezuk B, Zivin K, Meza R. U.S. Simulation of Lifetime Major Depressive Episode Prevalence and Recall Error. American Journal of Preventive Medicine. 2020. https://doi.org/10.1016/j.amepre.2020.03.021
This repository contains code to run a simulation model of major depressive episodes that adjusts for recall error in estimates of lifetime major depressive episodes (MDEs). The model is run in R and calibrated to data from the National Survey on Drug Use and Health (NSDUH) 2005-2017.
Download, clean, and harmonize NSDUH data
- Download the full combined NSDUH dataset for 2002-2017 here.
- Load the NSDUH data in R
- Run
data_clean.R
. This produces thedepprevs_2005-2017.Rda
file.
Perform model calibration and parameter estimation
- Specify the parameters to be estimated by adjusting the code in
main.R
(see code comments). This can also be done manually inparameters.xlsx
. - Run
calibration.R
to generate parameter estimates that minimize the sum of squared distances between model and NSDUH data.
Run the model and generate Figures 2, 3, 4, S1, S2, S4:
- Run
main.R
with the calibrated parameter estimates. - Run
manuscript_figures.R
.
Run sensitivity analysis and generate Figures S3 and S5:
- Run
sensitivity_analysis.R
. This produces thePSE_200N_50B.Rda
file.