The files “SSQ_SNP_code_example.R” and "SSQSNP_allsims_500.R" contain code to replicate the methods of "Adaptive Semi-Supervised Inference for Optimal Treatment Decisions with Electronic Medical Record Data" by Gunn, Lu, and Song. An example is provided of the component-wise bias, empirical SE, asymptotic SE, coverage probability for the 95% CI, and component-wise RE calculated on simulated data.
The file contains R functions to perform SSQ-SNP as described in Section 4.2, and estimate the asymptotic SE for the regression coefficients using the variance estimator explained in Section 4.3.
Additionally, the R packages MASS and RandomForest may need to be installed to run code for the simulated data.