Package: SCMs 0.1.1

Zubin Jelveh

SCMs: Specification Curve Analysis for Synthetic Control Methods

Estimates synthetic control models while exposing the implementation choices that define the synthetic counterfactual: how matching variables are constructed, how predictor weights are set, which constraints the donor weights satisfy (simplex, lasso, ridge, penalized), whether an intercept is included, and which outcome model corrects for bias (OLS, ridge, lasso, augmented synthetic control). Runs specification-curve analysis over a grid of these choices (Simonsohn, Simmons and Nelson (2020) <doi:10.1038/s41562-020-0912-z>), with placebo-in-space and bootstrap inference for single specifications and placebo inference for the curve as a whole, and uses 'xgboost' models with SHAP values (Lundberg and Lee (2017) <doi:10.48550/arXiv.1705.07874>) to show which choices drive the estimates. Methods follow Abadie, Diamond and Hainmueller (2010) <doi:10.1198/jasa.2009.ap08746>, Abadie (2021) <doi:10.1257/jel.20191450>, Ben-Michael, Feller and Rothstein (2021) <doi:10.1080/01621459.2021.1929245> and Chen and Guestrin (2016) <doi:10.1145/2939672.2939785>.

Authors:Zubin Jelveh [aut, cre]

SCMs_0.1.1.tar.gz
SCMs_0.1.1.zip(r-4.7-any)SCMs_0.1.1.zip(r-4.6-any)
SCMs_0.1.1.tar.gz(r-4.7-any)SCMs_0.1.1.tar.gz(r-4.6-any)
SCMs_0.1.1.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
SCMs/json (API)

# Install 'SCMs' in R:
install.packages('SCMs', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/zjelveh/scms/issues

On CRAN:

Conda:

3.18 score 15 exports 66 dependencies

Last updated from:45446e0307. Checks:6 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK229
source / vignettesOK269
linux-releaseOK194
windows-develOK165
windows-releaseOK156
wasm-releaseOK169

Exports:create_analysis_configcreate_scm_datasetcreate_xgboost_configestimate_scinference_placeboinference_scplot_spec_curverun_spec_curve_analysisrun_xgboost_shap_analysisscdatascestscplotspec_curveSpecResultsManagersynth

Dependencies:backportscheckmateclarabelclicodetoolscowplotcpp11curlCVXRdata.tabledoParalleldplyrECOSolveRfarverforeachgenericsggplot2glmnetgluegmpgridExtragridtextgtablehighsisobanditeratorsjpegkernlablabelinglatticelifecyclelitedownmagrittrmarkdownMatrixnloptrnumDerivoptimxosqppillarpkgconfigpngpracmapurrrR6RColorBrewerRcppRcppEigenrlangS7scalesscsshapeslamstringistringrsurvivaltibbletidyrtidyselectutf8vctrsviridisLitewithrxfunxml2

Advanced Features: Customization and Optimization
Advanced Features and Customization | Performance Optimization | Large-Scale Specification Curves | Parallel Processing Configuration | Custom Constraint Specifications | Advanced Solver Configuration | Memory Management for Large Analyses | Using the SpecResultsManager | Batch Processing for Extremely Large Specification Spaces | Advanced Visualization | Custom Specification Curve Plots | SHAP Value Analysis and Visualization | Methodological Extensions | Custom Inference Methods | Custom Feature Engineering | Integration with External Tools | XGBoost and SHAP Integration | Database Integration for Large Datasets | Computational Considerations | Memory Profiling | Optimization Recommendations | Conclusion | References

Last update: 2026-11-04
Started: 2026-11-04

Complete Workflow: California Tobacco Control Program Analysis
Complete Workflow Example | Background | Data Preparation | Load and Examine Data | Exploratory Data Analysis | Specification Curve Analysis Setup | Define Covariate Specifications | Configuration Options | Run Specification Curve Analysis | Execute Analysis | Analyze Results | Basic Results Summary | Visualize Specification Curve | Statistical Inference | Interpretation and Robustness | Effect Size Analysis | Robustness Assessment | SHAP Value Analysis | Policy Implications | Key Findings | Methodological Insights | Practical Recommendations | Conclusion | References

Last update: 2026-11-04
Started: 2026-11-04

Introduction to SCMs: Synthetic Control Methods with Specification Curve Analysis
Introduction | What are Synthetic Control Methods? | Why Specification Curve Analysis? | Package Highlights | Basic Workflow | Quick Start Example | Create Example Data | Basic Synthetic Control Analysis | Specification Curve Analysis | Understanding the Output | Treatment Effect Distribution | Key Interpretations | Statistical Inference | SHAP Value Interpretation | Next Steps | References

Last update: 2026-11-04
Started: 2026-11-04

Readme and manuals

Help Manual

Help pageTopics
Augment Synthetic Control Data with Fitted Values and Residualsaugment.scest
Clarabel W Optimization - OLS (Unconstrained)b.est.clarabel.ols
Clarabel W Optimization - Simplexb.est.clarabel.simplex
Unified Clarabel W Optimization Dispatcherb.est.clarabel.unified
CVXR fallback function for W optimizationb.est.cvxr.fallback
Bootstrap-based significance testing under null hypothesis of no treatment effectbootstrap_null_inference
Calculate Multiple Test Statistics and Rank-based P-valuescalculate_abadie_significance
Calculate Bootstrap P-values Using Rank-Based Methodcalculate_bootstrap_pvalues
Calculate Placebo-in-Space Curve-Level Inferencecalculate_spec_curve_pvalues_filtered
Coef Method for Synthetic Control Methodscoef.scest
Create Configuration for Multiple Dataset Analysiscreate_analysis_config
Create Bootstrap Dataset by Unit-level Resamplingcreate_bootstrap_dataset
Create Dataset for Synthetic Control Methodcreate_scm_dataset
Create Configuration for Direct Long Format Analysiscreate_xgboost_config
Enforce Null Hypothesis by Subtracting Treatment Effectsenforce_null_hypothesis
Estimate Synthetic Control Modelestimate_sc
Formula-Based Interface for SCMsformula-interface
Extract Model-Level Summary Statisticsglance.scest
Perform placebo inference with multiple test statisticsinference_placebo
Perform Placebo Inference for Synthetic Control Resultsinference_sc
Perform Bootstrap Inferenceperform_bootstrap_inference
Plot Specification Curve with Internal SHAP Computation and Filteringplot_spec_curve
Plot Method for Specification Curve Resultsplot.spec_curve
Summary Method for Synthetic Controlprint.scdata
Print Method for Synthetic Control Methodsprint.scest
Print Method for Formula-Based Synthetic Controlprint.scest_formula
Run Specification Curve Analysis with Multiple Configurationsrun_spec_curve_analysis
Run Direct XGBoost Analysis on Long Format Datarun_xgboost_shap_analysis
Create Synthetic Control Data Structurescdata
Synthetic Control Estimation for Single Treated Unitscest
Plot Synthetic Control Point Estimates and Prediction Intervalscplot
Solve QP using Clarabel for V optimizationsolve_qp_clarabel
*CORE ENGINE* - Specification Curve Computationspec_curve
S3 Methods for Specification Curve Objectsprint.spec_curve spec_curve-methods
Specification Results Storage ManagerSpecResultsManager
Summary Method for Synthetic Control Predictionsummary.scdata
Summary Method for Synthetic Control Predictionsummary.scest
Summary Method for Formula-Based Synthetic Controlsummary.scest_formula
Summary Method for Specification Curve Resultssummary.spec_curve
Synthetic Control with Formula Interfacesynth
Broom-Compatible Tidy Methods for Synthetic Control Objectstidy-methods
Extract Synthetic Control Weights in Tidy Formattidy.scest
Extract Specification Curve Results in Tidy Formattidy.spec_curve