I am running a fixed effects panel regression use the PanelOLS() function in linearmodels 4.5.
While trying to add the 'entity_effects=True' and 'time_effects=True' in the model estimation, it returned 'AbsorbingEffectError':
The model cannot be estimated. The included effects have fully absorbed one or more of the variables. This occurs when one or more of the dependent variable is perfectly explained using the effects included in the model.
How can I fix the 'AbsorbingEffectError'?
panel = panel.set_index(['firm', 'Date'])
exog_vars = panel[['ex_mkt', 'MV', 'ROA', 'BTM','leverage','2nd']]
exog = sm.add_constant(exog_vars)
y = panel[['ex_firm']]
model = PanelOLS(y, exog_vars,entity_effects=True).fit(cov_type='clustered', cluster_entity=True)
I am following the exact same steps as the example of the Fixed Effects model from the documentationhttps://bashtage.github.io/linearmodels/doc/panel/examples/examples.html#