Here we describe how to reproduce the plots in Doubly robust confidence sequences for sequential causal inference. This is broken up into three steps:
- Run simulations,
- Analyze sepsis data (optional), and
- Generate plots from the output of steps 1 and 2.
The sepsis data analysis is labeled as "optional" because it requires access to, and extracting from, the MIMIC-III database, which requires significant memory and computational resources. For instructions on how to extract data from MIMIC-III, see the README found in this folder.
First, make sure that drconfseq
is installed in your R environment:
# Install devtools from CRAN if you don't have it: install.packages("devtools")
devtools::install_github("wannabesmith/drconfseq")
Now, clone the git repository:
git clone [email protected]:WannabeSmith/drconfseq.git
Navigate to the simulations folder:
cd drconfseq/paper_plots/simulations/
Run all simulations using the shell script. For example,
# Use the shell of your choice, e.g. zsh.
# Note, this could take a while...
zsh generate_plot_RData.sh
Alternatively, you can run each simulation separately. For example,
cd observational_study_SL/
Rscript observational_study_SL.R
and so on.
See the README in this folder.
Open drconfseq/paper_plots/plots_for_paper.Rmd
with RStudio and run the chunks sequentially. Alternatively you can simply knit the Rmd file.
Note that if you did not complete step 2, the final chunk will not run correctly (and neither will a full knit).