Supplemental Material for "Transfer Learning for Individualized Treatment Rules with Application to Sepsis Patients Data"

This file offers a brief description on the content of this folder as well as a tutorial on how to use the code files. 

Description:

"cleandata" folder contains the preprocessed data files "eicu_base.csv" and "mimic_base.csv" used in our application. "eicu_base.csv" and "mimic_base.csv" correspond to eICU-CRD and MIMIC-III respectively. 

"TLITR Functions.R" is a R script file that contains functions used in both the application and simulation study. 

"TLITR Application.Rmd" is a R markdown file that contains the code for the application results.

"TLITR Simulation Study.Rmd" is a R markdown file that contains the code for the simulation study results. 

Tutorial:

To reproduce the results shown in the Medical Application section in the manuscript, run "TLITR Application.Rmd".  The setup code chunk must be run first to load packages, data, and functions required for following code chunks. The purpose of each code chunk is labeled in the header before the code chunk. 

Before the the GA optimization, code chunks should be run sequentially. Starting from the GA optimization steps (Line 147), the code chunks do not need to be run sequentially. Options to run different number of iterations are represented in different code chunks. Customizable components (number of iterations, random seed number, starting seed number, etc.) are labeled by comments in these code chunks.  

Run code chunk "single" (Single Iteration of GA optimization for weighted ITR) with seed 866 to produce optimal weighted ITR shown in the application results. 

To reproduce the results shown in the Simulation Study section in the manuscript, run "TLITR Simulation Study.Rmd". The setup code chunk must be run first to load packages and functions required. The following code chunks should be run sequentially. 

