Skip to contents

Thin wrapper around DRDID::drdid_rc for the 2x2 repeated-cross-section setting. Combines an outcome regression model with an inverse-probability weighting model and is consistent if either model is correctly specified. Hard-errors if DRDID is not installed.

Usage

morie_did_doubly_robust(
  data,
  outcome,
  treatment,
  post,
  covariates,
  ps_model = "logistic",
  or_model = "linear",
  cluster = NULL,
  n_bootstrap = 200L,
  seed = 42L,
  alpha = 0.05
)

Arguments

data

A data frame containing the outcome, treatment, post and any covariate columns.

outcome

Name of the outcome column.

treatment

Name of the binary (0/1) treatment-group column.

post

Name of the binary (0/1) post-period column.

covariates

Optional character vector of covariate column names.

ps_model

Unused; retained for back-compat. DRDID fits a logistic propensity-score model internally.

or_model

Unused; retained for back-compat. DRDID fits a linear outcome model internally.

cluster

Optional cluster ID column for CR1 standard errors.

n_bootstrap

Number of bootstrap replications (forwarded as nboot).

seed

RNG seed (set before the call).

alpha

Significance level for confidence intervals (default 0.05).

Value

A result list; see morie_did_2x2.

Details

For panel data (same units observed in both periods) prefer DRDID::drdid_panel directly.

References

Sant'Anna, P. H. C., & Zhao, J. (2020). Doubly robust difference-in-differences estimators. Journal of Econometrics, 219(1), 101–122.