# evidence-factor-simulation
<pre>
  .
  ├── evidence_factors_backdoor_frontdoor.R — simulation study of the hypothesis test using data generated by dgp_backdoor_frontdoor.R
  ├── evidence_factors_backdoor_frontdoor_iv.R — simulation study of the hypothesis test using data generated by dgp_backdoor_frontdoor_IV.R
  ├── evidence_factors_backdoor_iv.R — simulation study of the hypothesis test using data generated by dgp_backdoor_IV.R
  ├── evidence_factors_frontdoor_iv.R — simulation study of the hypothesis test using data generated by dgp_frontdoor_IV.R
  ├── main_bf.R — the main file that calls evidence_factors_backdoor_frontdoor.R to run all simulations for backdoor and front-door settings
  ├── main_bfi.R — the main file that calls evidence_factors_backdoor_frontdoor_iv.R to run all simulations for backdoor, front-door, and IV settings
  ├── main_bi.R — the main file that calls evidence_factors_backdoor_iv.R to run all simulations for backdoor and IV settings
  ├── main_fi.R — the main file that calls evidence_factors_frontdoor_iv.R to run all simulations for front-door and IV settings
  ├── simulation_backdoor_adjustment_unblocked.R — simulation study of the hypothesis test using data generated by dgp_backdoor_adjustment.R
  ├── framingham_data_analysis.R — data analysis on the data from Framingham Heart Study
  ├── WLS_data_analysis.R — data analysis on the data from Wisconsin Longitudinal Study
  ├── Karmakar_two_sided.R — modify the analyses in Karmakar et al.(2021) to two-sided tests
  ├── plot_size_power.R — plot the simulation results displayed in the paper
  ├── R                             
  │   ├── dgp_backdoor_frontdoor.R - data generation functions for the simulation study combining backdoor and front-door models 
  │   ├── dgp_backdoor_frontdoor_IV.R - data generation functions for the simulation study combining backdoor, front-door, and IV models
  │   ├── dgp_backdoor_IV.R - data generation functions for the simulation study combining backdoor and IV models
  │   ├── dgp_frontdoor_IV.R - data generation functions for the simulation study combining front-door and IV models
  │   ├── dgp_backdoor_adjustment.R - data generation functions for the simulation study combining three backdoor models with different adjustment sets
  │   ├── estimators.R - functions of backdoor, front-door, and IV asymptotic linear estimators
  │   ├── functions.R - other functions used in the study
  │   └── tests                
  │       ├── test_estimators.R - test the correctness of the functions in estimators.R 
  │       └── test_functions.R - test estimating and evidence factor functions in functions.R
  ├── Framingham  
  │   ├── preprocess_framingham.py - preprocess the Framingham Heart Study data
  │   └── framingham_data_out.csv - cleaned data for the analysis in the paper 
  ├── simulation_results - datasets of all simulation results described in the paper   
  ├── plots - plots of all simulation results displayed in the paper             
  └── README.md   
  
</pre>