I absolutely think we need a better way of using fixed effects in GLM and statsmodels mode generally. I think either fe(x)
or categorical(x)
or something should be used to refer to fixed effects. For reference, the way to do this in StatsModels currently is
julia> lm(@formula(income ~ edu + state), df, contrasts = Dict(:state => EffectsCoding()))
Also, you have a typo in your post
reg(df, f1, Vcov.cluster(:state)) #Error
This works fine, does not error.
I definitely think that
- StatsModels should support
fe
- FixedEffectModels should support
glm
and the general ecosystem better.