-
-
Notifications
You must be signed in to change notification settings - Fork 90
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 coefplot and groupedcoefplot for StatisticalModel #491
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! I'm happy to have this functionality in this package. It's a lot of code though, so we'll probably need a few rounds of review.
A few general comments first:
- I know StatsPlots doesn't consistently do this (yet), but it would make the code more readable if the function calls/types were prefixed with the package name where they're defined (or implemented, if we rely on the implementation)
- Can you make your utility function names more descriptive? This will make it easier for me to follow the code.
- You've essentially implemented a forest plot. This is generally useful apart from plotting coefficients of statistical models. Would it make sense to refactor to a
forestplot
primitive and acoefplot
that extracts the coefficients and passes them toforestplot
?
Hi, sorry for the long delay. I had some time so I refactored the code, let me know if it is clearer. |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #491 +/- ##
===========================================
+ Coverage 26.52% 37.77% +11.24%
===========================================
Files 20 21 +1
Lines 1248 1660 +412
===========================================
+ Hits 331 627 +296
- Misses 917 1033 +116
☔ View full report in Codecov by Sentry. |
The new dependency is minimal (StatsModels), test dependencies are a bit bigger (CategoricalArrays, DataFrames, GLM).
Tested with the gr, pyplot and plotly backends.
It was tested and working with GLM.jl, MixedModels.jl and RobustModels.jl models. I don't know other packages that use the StatsModels API.