Skip to contents

Placebo DiD on outcomes that should be unaffected

Usage

morie_did_placebo_test_outcome(
  data,
  placebo_outcomes,
  treatment,
  post,
  covariates = NULL,
  cluster = NULL,
  alpha = 0.05
)

Arguments

data

Data frame.

placebo_outcomes

Character vector of outcome columns expected to show no treatment effect.

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.

cluster

Optional cluster ID column for CR1 standard errors.

alpha

Significance level for confidence intervals (default 0.05).

Value

A data frame, one row per placebo outcome.

Examples

set.seed(1)
n <- 400
d <- rbinom(n, 1, 0.5); p <- rbinom(n, 1, 0.5)
df <- data.frame(d = d, post = p,
                 y_pl1 = rnorm(n), y_pl2 = rnorm(n))
out <- morie_did_placebo_test_outcome(df, c("y_pl1", "y_pl2"),
                                      "d", "post")
out
#>              outcome    estimate std_error   p_value significant
#> interaction    y_pl1 -0.00383304 0.2169802 0.9859058       FALSE
#> interaction1   y_pl2 -0.12846364 0.2092800 0.5393237       FALSE