single_augsynth: Fit Augmented SCM

View source: R/augsynth.R

single_augsynthR Documentation

Fit Augmented SCM

Description

Fit Augmented SCM

Usage

single_augsynth(
  form,
  unit,
  time,
  t_int,
  data,
  progfunc = "ridge",
  scm = T,
  fixedeff = FALSE,
  cov_agg = NULL,
  ...
)

Arguments

form

outcome ~ treatment | auxillary covariates

unit

Name of unit column

time

Name of time column

t_int

Time of intervention

data

Panel data as dataframe

progfunc

What function to use to impute control outcomes ridge=Ridge regression (allows for standard errors), none=No outcome model, en=Elastic Net, RF=Random Forest, GSYN=gSynth, mcp=MCPanel, cits=Comparitive Interuppted Time Series causalimpact=Bayesian structural time series with CausalImpact

scm

Whether the SCM weighting function is used

fixedeff

Whether to include a unit fixed effect, default F

cov_agg

Covariate aggregation functions, if NULL then use mean with NAs omitted

...

optional arguments for outcome model

Value

augsynth object that contains:

  • "weights"Ridge ASCM weights

  • "l2_imbalance"Imbalance in pre-period outcomes, measured by the L2 norm

  • "scaled_l2_imbalance"L2 imbalance scaled by L2 imbalance of uniform weights

  • "mhat"Outcome model estimate

  • "data"Panel data as matrices


ebenmichael/augsynth documentation built on March 20, 2024, 5:20 a.m.