Level counts of the absorbed fixed effects in the estimation sample.
Parameters
Name
Type
Description
Default
n_levels_by_fe
tuple[int, …]
Number of levels of each fixed effect after sample filtering, in the order of ModelDescription.fixed_effects. A fixed effect left with a single level, e.g. by the GLM separation check, still counts.
()
has_intercept_by_fe
tuple[bool, …]
Whether each fixed effect has level-specific intercepts. Slope-only effects such as f1[[z]] have none.
()
n_slopes_by_fe
tuple[int, …]
Number of varying-slope covariates of each fixed effect; f1[z1, z2] has two.
()
Examples
import pyfixest as pffit = pf.feols("Y ~ X1 | f1 + f2", pf.get_data())counts = fit.fixef_countscounts.n_levels_by_fe, counts.n_fixef, counts.n_levels, counts.fixef_dof