cv_pensynth {pensynth} | R Documentation |
Hold-out validated penalized synthetic control estimator
Description
Compute a penalized synthetic control estimator with hold-out validation for the lambda penalty parameter. Lambda will be determined by minimizing the mean squared error on a hold-out set of pre-intervention outcome time-series.
Usage
cv_pensynth(
X1,
X0,
Z1,
Z0,
v = 1,
nlambda = 100,
opt_pars = clarabel::clarabel_control(),
standardize = TRUE,
return_solver_info = FALSE
)
Arguments
X1 |
|
X0 |
|
Z1 |
|
Z0 |
|
v |
|
nlambda |
|
opt_pars |
|
standardize |
|
return_solver_info |
|
Details
The lambda sequence is an exponentially increasing sequence where The minimum lambda is always 1e-11, the max lambda is determined by the data.
Value
A list of the lambda sequence, the associated weights, and the mses. If
return_solver_info
is TRUE
, the list will also contain diagnostic information about
the solvers.
See Also
pensynth()
, plot.cvpensynth()
, placebo_test()
, simulate_data()
Examples
set.seed(45)
dat <- simulate_data()
res <- with(dat, cv_pensynth(X1, X0, Z1, Z0))
plot(res)