Skip to content

BUG: Fix definition of GLS r2 - #4967

Merged
josef-pkt merged 1 commit into
statsmodels:masterfrom
bashtage:gls-centered-r2
Sep 9, 2018
Merged

josef-pkt merged 1 commit into
statsmodels:masterfrom
bashtage:gls-centered-r2

Conversation

@bashtage

Copy link
Copy Markdown
Member

Fix definitin of GLS r2 for equivalence with WLS

closes #1252
closes #1171

@codecov-io

codecov-io commented Aug 23, 2018 •

Copy link
Copy Markdown

Codecov Report

Merging #4967 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4967      +/-   ##
==========================================
+ Coverage   81.31%   81.32%   +0.01%     
==========================================
  Files         582      582              
  Lines       89939    89945       +6     
  Branches    10084    10085       +1     
==========================================
+ Hits        73136    73151      +15     
+ Misses      14509    14503       -6     
+ Partials     2294     2291       -3
Impacted Files Coverage Δ
statsmodels/regression/tests/test_regression.py 99.61% <ø> (-0.01%) ⬇️
statsmodels/regression/linear_model.py 91.28% <100%> (+0.1%) ⬆️
statsmodels/regression/mixed_linear_model.py 89.77% <0%> (+0.79%) ⬆️

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 53f5c5d...d4b0801. Read the comment docs.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.03%) to 83.898% when pulling b29ddaa on bashtage:gls-centered-r2 into 66fc298 on statsmodels:master.

@coveralls

coveralls commented Aug 23, 2018 •

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.008%) to 83.848% when pulling d4b0801 on bashtage:gls-centered-r2 into 53f5c5d on statsmodels:master.

Comment thread statsmodels/regression/linear_model.py Outdated
model.endog - np.average(model.endog, weights=weights))**2)
else: # this is probably broken for GLS
mean = np.average(model.endog, weights=weights)
print(mean)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Print needed?

@bashtage

Copy link
Copy Markdown
Member Author

Nope.

Fix definitin of GLS r2 for equivalence with WLS

closes statsmodels#1252
closes statsmodels#1171
@josef-pkt

Copy link
Copy Markdown
Member

LGTM, merging

@bashtage thank you

@josef-pkt
josef-pkt merged commit 7e4f47b into statsmodels:master Sep 9, 2018
@bashtage
bashtage deleted the gls-centered-r2 branch September 10, 2018 11:12
@josef-pkt josef-pkt added this to the 0.10 milestone Sep 15, 2018
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.

BUG: regression centered_tss for GLS GLS uncentered_tss and rsquared

5 participants