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 :devianceratio variant to r² function #550
Conversation
Add another generalization for r2 to GLM that uses the deviance ratio. Change the last line of the docs to state that it corresponds to mss/tss for OLS.
Codecov Report
@@ Coverage Diff @@
## master #550 +/- ##
==========================================
- Coverage 90.39% 90.13% -0.27%
==========================================
Files 21 21
Lines 2104 2250 +146
==========================================
+ Hits 1902 2028 +126
- Misses 202 222 +20
Continue to review full report at Codecov.
|
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.
Sure, why not.
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!
Another generalization for R² to GLM is by using the deviance ratio (https://www.sciencedirect.com/science/article/pii/S0304407696018180). As deviance is zero for the saturated model, r² values are defined between 0 when the considered model is the null model, with the minimal number of parameters; and 1 when the model is the saturated model, with the maximal number of parameters.
Using this variant gives the same result
mss/tss
for OLS, which is mentioned in the last line of the doc. See #549