StatsReporting / stargazer

Python implementation of the R stargazer multiple regression model creation tool
Other
196 stars 48 forks source link

Add support for IV2SLS models from linearmodels package #99

Closed jsr-p closed 10 months ago

jsr-p commented 11 months ago

I have extended the support for panel models from linearmodels to also handle the second stage results from IV2SLS models from linearmodels. Moreover, I have included an example in the example.ipynb notebook.

What is left to be done is to written as TODO: in linearmodels.py inside the translators module. One of those is to also handle the first stage results.

toobaz commented 10 months ago

Merged, thanks! I've just moved _merged_dicts to starlib in 4ee765002f67968047a2f4e096a8250a1795ce1c as it is potentially useful more in general.

jsr-p commented 10 months ago

Merged, thanks! I've just moved _merged_dicts to starlib in 4ee7650 as it is potentially useful more in general.

My pleasure, thanks! I would have used the dict1 | dict2 way of merging dicts from pep584; but this is not compatible with python 3.8 and earlier (and statsmodels is supporting >= python 3.8); that's the reason for the extra function :smile:

toobaz commented 10 months ago

I would have used the dict1 | dict2 way of merging dicts from pep584; but this is not compatible with python 3.8 and earlier (and statsmodels is supporting >= python 3.8); that's the reason for the extra function 😄

Good point - I've added a comment to remind this.