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

⁠N_covars by 1 matrix⁠ of treated unit covariates

X0

⁠N_covars by N_donors matrix⁠ of donor unit covariates

Z1

⁠N_targets by 1 matrix⁠ of treated unit hold-out outcome

Z0

⁠N_targets by N_donors matrix⁠ of donor unit hold-out outcome

v

⁠N_covars vector⁠ of variable weights, default 1

nlambda

integer length of lambda sequence (see details)

opt_pars

clarabel settings using clarabel::clarabel_control()

standardize

boolean whether to standardize the input matrices (default TRUE)

return_solver_info

boolean whether to return diagnostic information concerning solver (default FALSE)

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)

[Package pensynth version 0.5.1 Index]