1226407869 发表于 2021-9-16 20:10 
初步看了一下,好像是你的固定效应不一样吧。你Stata里面控制了交叉的固定效应,而linearmodels中却没有控 ...
非常感谢,主要我的导师是作Python的,我们都是用python来做回归,老师给的建议是用statasmodels包,但依然解决不了固定交互项,下面是我新的代码,您可以给一些建议吗?
firm_year_fe_ols = smf.ols(formula='Patent ~Fintech + Size + LEV + Growth + CapEx + PPE + Indep + GDP + Population + C(year*industry)',data=data)
firm_year_fe_ols=firm_year_fe_ols.fit(cov_type='cluster',cov_kwds={'groups': data['city']},use_t=True)
print(firm_year_fe_ols.summary())