-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Linearmodels library #26
Comments
My 2 cents: linearmodels might "extend" in some sense statsmodels but its objects do not seem to inherit anything from statsmodels' objects. I don't think it is worth for stargazer to support each library that is able to run regressions (e.g. including the more widely adopted scikit-learn), as it would then have to track any change in the internal layout of both statsmodels and the other library. Instead, I suspect it would be easy for linearmodels devs (or even an independent project) to build a compatibility layer which puts model internals where statsmodels expects them. I did something similar in https://github.com/toobaz/rmodel , which allows R models to be plugged into stargazer tables. |
FWIW there's a SO question on this: https://stackoverflow.com/questions/60620142/using-stargazer-to-output-latex-code-from-linearmodels-model-fit Maybe until it's implemented (if ever), it could throw a specific error saying it's not implemented for |
A bit of background: statsmodels is way too rigid to support data structures that are not easily described as a single y variable fit against an array of x variable. This has manifested itself in multiple places in statsmodels, e.g, Vector AR modeling. This is why linearmodels does not inherit from statsmodels although it tries to use similar vocabulary were reasonable (it does differ sometimes when statsmodels is too loyal to Stata to the point of confusion, e.g., |
I see, good point. I'm pretty sure that as of now, anything in linearmodels which deviates from the statsmodels' scheme is unsupported in stargazer. So I see two possibilities (notice I have no experience with linearmodels, nor with tables involving complex R models):
One thing to keep in mind is that stargazer is very far from even support of most models in statsmodels. |
This can't happen since linearmodels is too widely used, is mature, and well tested.
I think it is the wrong approach to be overly wed to statsmodels' results as the object of interest. As a utility project, it would make more sense to have I posted some details of how I would approach it here. |
I hope I made it clear that I'm thinking of sharing interfaces in the sense of standards, not of actual code... but let's continue the discussion there. |
Are there any news about this feature? |
Hi, i love the library and idea and I'd love to see support added for Panel Regressions from the linearmodels package - https://github.com/bashtage/linearmodels. This library extends statsmodels and should not be too incompatible. The issue now is that it does not return a RegressionModelSummary object from the statsmodel library and instead it's own summary object.
The text was updated successfully, but these errors were encountered: