This repository contains a collection of R scripts for the SCBM (Shrinkage Causal Bootstrap MARS) project. The scripts support data simulation, causal inference modeling, subgroup effect analysis, model evaluation, and visualization in both randomized and observational data settings.
| Script Name | Description |
|---|---|
fun_GL_PS.R |
Group lasso + bootstrap bagging MARS model for HTE estimation, with IPTW and transformed outcome variants. |
fun_GL_PS_stratify.R |
Group lasso + bootstrap bagging MARS model for HTE estimation, with stratification variant. |
he.heatmapdata.R |
data for the heatmapplot of sensitivity analysis |
he.heatmapplot.R |
plot for the heatmapplot of sensitivity analysis |
he.simulaitonplot.R |
Generates boxplots for MSE or bias comparison across multiple methods. (plot) |
he.simulaitondata.R |
Generates boxplots for MSE or bias comparison across multiple methods. (data) |
he.simulaitonsetting.R |
Generates boxplots for MSE or bias comparison across multiple methods. (setting) |
he.trendplot.R |
Shows subgroup-wise trends of true vs. predicted treatment effects (HTEs). |
he.pdplot.R |
Partial dependence plots (PDPs) for a real dataset using group lasso + MARS. |
he.vimpplot.R |
Variable importance analysis for real-world data. |
he.VIMPvalidation.R |
Validation of Variable importance analysis for real-world data. |
he.realdatagreedy.R |
SEARCH the best parameters in real dataset. |
These scripts rely on the following R packages:
grfearthglmnetgrpregBARTrandomForestrpartggplot2reshape2doParallelforeachcowplot,gridExtra
Install all dependencies with:
install.packages(c("grf", "earth", "glmnet", "grpreg", "BART", "randomForest",
"rpart", "ggplot2", "reshape2", "doParallel", "foreach",
"cowplot", "gridExtra"))
install.packages("remotes")
remotes::install_github("saberpowers/causalLearning")