| fect_iden | R Documentation |
Implements the over-identification test described in the slide:
run two auxiliary regressions of residualized outcomes on the moderator
and covariates (including quadratic and interaction terms) with unit and
time fixed effects, then test using n \times R^2 \sim \chi^2(df),
where df is the number of *nonlinear* (quadratic + interaction) terms that
remain in the fitted model.
fect_iden(
x,
moderator,
covariates = NULL,
quadratic = TRUE,
interaction = TRUE
)
x |
A 'fect' object. Must be estimated with 'cm=TRUE' so that 'x$est.cm' exists. |
moderator |
Character scalar. Name of the moderator |
covariates |
Optional character vector. Names of other covariates |
quadratic |
Logical. Include quadratic terms |
interaction |
Logical. Include interaction terms |
A list with elements 'e1' and 'e0', each containing:
- 'n': sample size used in the auxiliary regression
- 'r2': R-squared of the auxiliary regression
- 'stat': n \times R^2
- 'df': degrees of freedom (# nonlinear terms kept)
- 'p': p-value from chi-square test
- 'model': the fitted 'fixest' model
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.