Inference: Support fixef_k = "nested"
for small sample correction in ssc()
for identical standard errors with fixest
#501
Labels
breaking change
Breaking Changes to PyFixest Functionality or User-Facing APIs
enhancement
New feature or request
good first issue
Good for newcomers
Context
At the moment,
PyFixest
's standard errors differ slightly fromfixest
defaults (explainer here).This is because
fixef_k = "nested"
is not implemented in PyFixest - in contrast to fixest, the default argument of thessc()
function isfixef_k = "none"
instead of "nested".Per the$k$ for small sample corrections, while "fixef.K="none" discards all fixed-effects coefficients".
fixest
docs, "fixef.K="nested" discards all coefficients of fixed effects nested within clusters" when computing the number of coefficientsFor examples of what is meant by a fixed effect nested in a cluster, take a look at the fixest vignette.
Task
Add the following variants to the
fixef_k
function argument of thepyfixest/pyfixest/utils/utils.py
Line 11 in a98a9b9
fixef_k="nested"
fixef_k="full"
Add unit tests against
fixest
.Change the default to
ssc(fixef_k = "nested")
, mirroringfixest
.Note that this introduces a breaking change to the PyFixest results - all default standard errors will deviate slightly.
The text was updated successfully, but these errors were encountered: