Skip to content
/ cm-dag Public

Code for the compartmental model/DAG project.

License

Notifications You must be signed in to change notification settings

epimath/cm-dag

Repository files navigation

cm-dag

Code for the compartmental model/DAG project: Havumaki J and Eisenberg MC, 2019. Mathematical modeling of directed acyclic graphs to explore competing causal mechanisms underlying epidemiological study data, medRxiv preprint.

The age-structured obesity paradox model can be ran in R using the model2_main.R file.

The code will sample parameter values using Latin Hypercube Sampling and simulate a yearlong cohort study for each parameter set. Once each study is completed, a simulated dataset is created (by caculating person-time and number of deaths for each disease state) and mortality rate ratios (comparing normal weight to obese) for ever-smokers and never-smokers are calculated.

The obesity paradox occurs when, for a given simualated study (sampled parameter set), normal weight ever-smokers have higher mortality rates than their obese counterparts (i.e., mortality rate ratio >1) AND normal weight never-smokers have lower mortality rates than their obese counterparts (i.e., mortality rate ratio <1).

About

Code for the compartmental model/DAG project.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages