Skip to content

Latest commit

 

History

History

paper_plots

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Reproduce paper plots

Here we describe how to reproduce the plots in Doubly robust confidence sequences for sequential causal inference. This is broken up into three steps:

  1. Run simulations,
  2. Analyze sepsis data (optional), and
  3. 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.

1. Run simulations

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.

2. Analyze sepsis data (optional)

See the README in this folder.

3. Generate plots

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).