Skip to content
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

Merged
merged 5 commits into from Mar 2, 2020

Conversation

getzze
Copy link
Contributor

@getzze getzze commented Jan 21, 2020

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

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
Copy link

codecov bot commented Jan 21, 2020

Codecov Report

Merging #550 into master will decrease coverage by 0.26%.
The diff coverage is 0%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
src/statmodels.jl 44.62% <0%> (-4.47%) ⬇️
src/transformations.jl 90.71% <0%> (-4.75%) ⬇️
src/scalarstats.jl 93.9% <0%> (-3.23%) ⬇️
src/robust.jl 93.1% <0%> (-1.02%) ⬇️
src/deviation.jl 100% <0%> (ø) ⬆️
src/misc.jl 100% <0%> (ø) ⬆️
src/empirical.jl 100% <0%> (ø) ⬆️
src/ranking.jl 100% <0%> (ø) ⬆️
src/rankcorr.jl 100% <0%> (ø) ⬆️
src/partialcor.jl 100% <0%> (ø) ⬆️
... and 9 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update da42557...3175594. Read the comment docs.

Copy link
Member

@nalimilan nalimilan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, why not.

src/statmodels.jl Outdated Show resolved Hide resolved
src/statmodels.jl Show resolved Hide resolved
src/statmodels.jl Outdated Show resolved Hide resolved
src/statmodels.jl Outdated Show resolved Hide resolved
src/statmodels.jl Outdated Show resolved Hide resolved
@getzze getzze changed the title Add :deviance_ratio variant to r² function Add :devianceratio variant to r² function Jan 27, 2020
@getzze getzze mentioned this pull request Jan 27, 2020
src/statmodels.jl Outdated Show resolved Hide resolved
src/statmodels.jl Outdated Show resolved Hide resolved
src/statmodels.jl Outdated Show resolved Hide resolved
src/statmodels.jl Outdated Show resolved Hide resolved
src/statmodels.jl Outdated Show resolved Hide resolved
Copy link
Member

@nalimilan nalimilan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@nalimilan nalimilan merged commit 65351de into JuliaStats:master Mar 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants