Skip to content

Kisshot97/SCBM-R-Scripts

Repository files navigation

SCBM R Scripts

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.

Included Scripts

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.

Requirements

These scripts rely on the following R packages:

  • grf
  • earth
  • glmnet
  • grpreg
  • BART
  • randomForest
  • rpart
  • ggplot2
  • reshape2
  • doParallel
  • foreach
  • cowplot, 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")

About

Scripts for SCBM data generation, modeling, and visualization

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages