linearmodels icon indicating copy to clipboard operation
linearmodels copied to clipboard

Estimated Effects in random effect

Open KseniaNedorezova opened this issue 2 years ago • 7 comments

KseniaNedorezova avatar Sep 21 '23 14:09 KseniaNedorezova

Sorry, I think it is blank.

bashtage avatar Sep 21 '23 14:09 bashtage

Hi @KseniaNedorezova Is there an issue to ask about? Could you post some code demonstrating the issue?

bashtage avatar Sep 21 '23 14:09 bashtage

Hello everyone! I work with panel data All estimated effects are equal 0. Why estimated effects in random effect model equal 0? P-value of the model 0,0017.

KseniaNedorezova avatar Sep 21 '23 14:09 KseniaNedorezova

Can you please post some demo code that reproduces the problem.

bashtage avatar Sep 21 '23 14:09 bashtage

import pandas as pd from linearmodels import PanelOLS, RandomEffects

data = pd.read_excel(r"...", sheet_name = "....").reset_index(drop = True) data = data.set_index(['Name', 'Year']) mod_re_prod = RandomEffects(data['Percent'], data[['value_1', "value_2"]]).fit() mod_EF_re_prod = mod_re_prod.estimated_effects print(mod_EF_re_prod )

KseniaNedorezova avatar Sep 21 '23 15:09 KseniaNedorezova

Any chance you could use one of the demo datasets included with linearmodels to reproduce? That way I can run without needing any data, which might not be available to share.

bashtage avatar Sep 21 '23 15:09 bashtage

Can you post some runnable code so I can see if I can help you? This doesn't usually happen and so seems to be specific to your setup.

bashtage avatar Sep 26 '23 16:09 bashtage