def test_incorrect_type(data):
dependent = data.set_index(['nr', 'year']).lwage
exog = sm.add_constant(data.set_index(['nr', 'year'])[['expersq', 'married', 'union']])
mod = PanelOLS(dependent, exog)
res = mod.fit()
mod2 = IV2SLS(mod.dependent.dataframe, mod.exog.dataframe, None, None)
res2 = mod2.fit()
with pytest.raises(TypeError):
compare(dict(model1=res, model2=res2))
评论列表
文章目录