Skip to contents

Two-way fixed-effects DID for repeated cross-sections

Usage

twfe_did_rc(
  y,
  post,
  d,
  covariates = NULL,
  i.weights = NULL,
  boot = FALSE,
  boot.type = "weighted",
  nboot = NULL,
  multiplier_type = c("mammen", "normal", "bayes", "wild"),
  inffunc = FALSE
)

Arguments

y

Outcome vector.

post

Post-period indicator (1 post, 0 pre).

d

Treatment indicator (1 treated, 0 control).

covariates

Optional covariate matrix for saturation.

i.weights

Optional sampling weights vector (non-negative).

boot

Logical; if TRUE, use bootstrap for SE/CI.

boot.type

Bootstrap type ("multiplier" or "weighted").

nboot

Number of bootstrap draws.

multiplier_type

Multiplier bootstrap type when boot.type = "multiplier".

inffunc

Logical; include influence function in output.

Value

List with ATT estimates, uncertainty, and optional influence function.