- Description
- Reproducing the simulation studies
- Reproducing the real data analysis
- Notes on output and reproducibility
- Support
This repository contains code to reproduce the simulation studies and the real data analysis reported in the manuscript. All code is written in R. Results are written to .rds files and figures are produced from dedicated plotting scripts.
Fig1.pptx contains the figure corresponding to Figure 1 in the manuscript, which illustrates three different types of sources.
- Open R or RStudio.
- Set the working directory to the repository root.
- Run one or more of the simulation scripts listed in the following:
source("simulation_heter[1].R") source("simulation_sensitive.R")
- Each script writes its outputs as
.rdsfiles and save to simulation_result file. - To recreate the Table 1 in the manuscript, run:
source("Table1.R") - To recreate the figures in the manuscript, run:
source("Fig2.R") source("Fig3.R") source("Fig4.R") source("Fig5.R") source("Fig6.R")
- Open R or RStudio.
- Set the working directory to the repository root.
- To recreate Figure 7 in the manuscript, run:
source("Fig7.R") - We provide a simulated sample dataset that enables readers to reproduce results closely matching those reported in the manuscript. To the analysis, run
source("realdata.R")
- Figures are regenerated from the
.rdsresult files. If you delete or relocate those files, recreate them by rerunning the corresponding simulation or analysis script.
For questions about the code or the study design, please open an issue in the repository.