The scpi package provides Python, R and Stata implementations of estimation and inference procedures for synthetic control methods.
This work was supported by the National Science Foundation through grants SES-1947805 and SES-2019432, and by the National Institutes of Health through grant R01 GM072611-16.
Please email: scpi_pkg@googlegroups.com
To install/update in Python type:
pip install scpi_pkg
-
Help: PyPI repository.
-
Replication: py-script, plot illustration, data.
-
Illustration Staggered Adoption: py-script, plot illustration.
To install/update in R from CRAN type:
install.packages('scpi')
-
Help: R Manual, CRAN repository.
-
Replication: R-script, plot illustration, data.
-
Illustration Staggered Adoption: R-script, plot illustration.
The Stata implementation relies on Python, which needs to be available in the system.
There are at least two ways to install Python:
- Download and install Python directly from https://realpython.com/installing-python/.
- Download and install Anaconda for Windows, macOS, or Linux.
After Python is installed, please install the scpi package in Python using the instructions above.
Stata (16.0 or newer) and Python (>=3.8) can be linked following the official tutorial on the Stata blog.
net install scpi, from(https://raw.githubusercontent.com/nppackages/scpi/master/stata) replace
-
Replication files: do-file, plot illustration, data.
-
Illustration Staggered Adoption: do-file, plot illustration.
- Cattaneo, Feng, Palomba and Titiunik (2022): scpi: Uncertainty Quantification for Synthetic Control Estimators.
Working paper.
-
Cattaneo, Feng, Palomba and Titiunik (2022): Uncertainty Quantification in Synthetic Controls with Staggered Treatment Adoption.
Working paper (coming soon). -
Cattaneo, Feng and Titiunik (2021): Prediction Intervals for Synthetic Control Methods.
Journal of the American Statistical Association 116(536): 1865-1880.
Supplemental