| nonlinear_pretest | R Documentation |
Tests for pre-treatment violations of the parallel trends assumption in nonlinear staggered DiD settings. This is fundamentally different from the linear case because:
Scale dependence: Parallel trends on the probability scale does NOT
imply parallel trends on the latent index scale (and vice versa). Tests
are performed on the scale specified in outcome_model.
Roth-Sant'Anna sensitivity: Computes sensitivity of post-treatment estimates to violations of magnitude delta in pre-period, following Roth & Sant'Anna (2023).
Joint test: Provides a joint chi-squared test of all pre-period ATT(g,t) = 0, accounting for correlation across (g,t) cells.
nonlinear_pretest(
obj,
plot = TRUE,
alpha = 0.05,
type = c("joint", "individual", "honestdid")
)
obj |
An object of class |
plot |
Logical. If TRUE (default), produces a pre-trends plot. |
alpha |
Numeric. Significance level. Default 0.05. |
type |
Character. Type of pre-trends test:
|
A list with:
Data frame of pre-period ATT(g,t) with p-values.
Joint test statistic.
P-value for joint test.
Interpretive conclusion string.
Roth, J. (2022). Pretest with caution: Event-study estimates after testing for parallel trends. American Economic Review: Insights, 4(3), 305-322.
Roth, J., & Sant'Anna, P. H. C. (2023). When is parallel trends sensitive to functional form? Econometrica, 91(2), 737-747.
set.seed(99)
dat <- sim_binary_panel(n = 600, nperiods = 8, prop_treated = 0.5)
res <- nonlinear_attgt(dat, "y", "period", "id", "g",
outcome_model = "logit")
pt <- nonlinear_pretest(res)
print(pt)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.