Code for running analysis in: Methods for Estimating the Exposure-Response Curve to Inform the New Safety Standards for Fine Particulate Matter
This respository contains code used to conduct simulation studies comparing methods for exposure-response curves. It also contains a data application to the Medicare data set.
The main code scripts are as follows:
0_launch.jobs.shis script to launch jobs on the FASSE cluster1_run_simulation.Ris script to launch simulation for one exposure-outcome model, which launches 100 jobs2_aggregate_simulation.Ris script bind together 100 simulation results to calculate predictions and metrics3_paper_figures.Ris script to produce figures used in the paper/functions/contains scripts for running simulation/figures/saves figures used in publication/markdown_files/contains scripts used for exploratory data analysis and making additional plots
Code related to fitting model to Medicare database is found in /data_application/
0_data_prep.Ris script to load data and prepare it for analysis. This is run each time a new input dataset is prepared. This also prepares the bootstrap samples0_tune_CausalGPS.Ris script that tunes the XGBoost and caliper hyperparameters for the CausalGPS package, this only needs to be run once for each input dataset to find optimal parameters1_model_fit.Ris script to fit all ERC estimators to the data and generate the ERC for the Medicare dataset1_model_fit_boot.Ris script to fit all ERC estimators to the bootstrap data and generate the ERC for the Medicare dataset2_post_processing.Ris script to generate plots of ERC as well as covariate balance plots with included uncertainty from bootstrap/functions/contains two functions used for data application:/functions/entropy_wt_functions.Ris a more efficient implementation of entropy weighting for a large dataset/functions/fit_causalGPS_by_year.Rfits the CausalGPS package by year for Medicare dataset
bash_*.shall these scripts are used to launch jobs on the FASSE cluster