This function computes estimates and standard errors for panel data using selected estimators. It allows the user to select specific estimators and set parameters for Monte Carlo replications and seed.

panel_estimate(
  setup,
  selected_estimators = setdiff(names(panel_estimators), "mc"),
  mc_replications = 200,
  seed = 1
)

Arguments

setup

A list containing matrices Y, N0, and T0 for panel data analysis.

selected_estimators

A character vector specifying which estimators to use. For example, c("synthdid", "did", "sc", "difp", "mc", "sc_ridge", "difp_ridge") or names(panel_estimators). Defaults to all available estimators except 'mc'.

mc_replications

The number of Monte Carlo replications for computing standard errors. Applicable if the 'mc' estimator is used. Defaults to 200.

seed

An integer value to set the random seed for reproducibility. Defaults to 1.

Value

A list where each element corresponds to an estimator and contains its estimate and standard error.

Examples

if (FALSE) {
data('california_prop99')
setup = panel.matrices(california_prop99)
results_all = panel_estimate(setup)
results_selected = panel_estimate(setup, selected_estimators = c("did", "sc"))
summary(results_selected$did$estimate)
}