scpi
Prediction Intervals for Synthetic Control Methods with Multiple Treated Units and Staggered Adoption
Description
Implementation of prediction and inference procedures for Synthetic Control methods using least square, lasso, ridge, or simplex-type constraints. Uncertainty is quantified with prediction intervals as developed in Cattaneo, Feng, and Titiunik (2021) <doi:10.1080/01621459.2021.1979561> for a single treated unit and in Cattaneo, Feng, Palomba, and Titiunik (2025) <doi:10.1162/rest_a_01588> for multiple treated units and staggered adoption. More details about the software implementation can be found in Cattaneo, Feng, Palomba, and Titiunik (2025) <doi:10.18637/jss.v113.i01>.
Downloads
1.4K
Last 30 days
3204th
1.4K
Last 90 days
1.4K
Last year
CRAN Check Status
Show all 14 flavors
| Flavor | Status |
|---|---|
| r-devel-linux-x86_64-debian-clang | OK |
| r-devel-linux-x86_64-debian-gcc | OK |
| r-devel-linux-x86_64-fedora-clang | OK |
| r-devel-linux-x86_64-fedora-gcc | OK |
| r-devel-macos-arm64 | OK |
| r-devel-windows-x86_64 | OK |
| r-oldrel-macos-arm64 | OK |
| r-oldrel-macos-x86_64 | OK |
| r-oldrel-windows-x86_64 | OK |
| r-patched-linux-x86_64 | OK |
| r-release-linux-x86_64 | ERROR |
| r-release-macos-arm64 | OK |
| r-release-macos-x86_64 | OK |
| r-release-windows-x86_64 | OK |
Check details (16 non-OK)
*
*
*
*
*
*
*
*
*
*
dependencies in R code
Missing or unexported object: ‘CVXR::solve’
examples
Running examples in ‘scpi-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: scest
> ### Title: Prediction of Synthetic Control
> ### Aliases: scest
>
> ### ** Examples
>
>
> data <- scpi_germany
>
> df <- scdata(df = data, id.var = "country", time.var = "year",
+ outcome.var = "gdp", period.pre = (1960:1990),
+ period.post = (1991:2003), unit.tr = "West Germany",
+ unit.co = setdiff(unique(data$country), "West Germany"),
+ constant = TRUE, cointegrated.data = TRUE)
>
> result <- scest(df, w.constr = list(name = "simplex", Q = 1))
Error: 'solve' is not an exported object from 'namespace:CVXR'
Execution halted
whether package can be installed
Found the following significant warnings: Warning: replacing previous import ‘CVXR::var’ by ‘stats::var’ when loading ‘scpi’ Warning: replacing previous import ‘CVXR::sd’ by ‘stats::sd’ when loading ‘scpi’ See ‘/home/hornik/tmp/R.check/r-release-gcc/Work/PKGS/scpi.Rcheck/00install.out’ for details.
*
*
*
Check History
ERROR 13 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Mar 9, 2026
whether package can be installed
Found the following significant warnings: Warning: replacing previous import ‘CVXR::var’ by ‘stats::var’ when loading ‘scpi’ Warning: replacing previous import ‘CVXR::sd’ by ‘stats::sd’ when loading ‘scpi’ See ‘/home/hornik/tmp/R.check/r-release-gcc/Work/PKGS/scpi.Rcheck/00install.out’ for details.