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

ENH: Betareg rebased #4238

Closed
wants to merge 26 commits into from
Closed

Conversation

josef-pkt
Copy link
Member

this is a rebased version of my branch https://github.com/josef-pkt/statsmodels/tree/betareg_2030_3 of PR #2030

I just did the rebase, I don't know what the status is

The unit tests still have some commented out yield statements without corresponding assert

    def test_methylation_precision(self):
        rslt = self.meth_fit
        #yield check_same, links.logit()(rslt.params[-2:]), expected_methylation_precision['Estimate'], 1e-3, "estimate"

When I use
assert_allclose(links.logit()(rslt.params[-2:]), expected_methylation_precision['Estimate'], 1e-3)
instead of the yield, then I get a large test failure

    def test_methylation_precision(self):
        rslt = self.meth_fit
>       assert_allclose(links.logit()(rslt.params[-2:]), expected_methylation_pr
ecision['Estimate'], 1e-3)
E       AssertionError:
E       Not equal to tolerance rtol=0.001, atol=0
E
E       (mismatch 100.0%)
E        x: array([ 36.043653, -36.043653])
E        y: array([ 8.22829, -0.03471])

So there are still problems with convergence when link_precision=links.identity().
(Which I don't think makes a lot of sense anyway, given the positivity constraint on variance/precision)
or there are problems in the unit test themselves.

@josef-pkt josef-pkt mentioned this pull request Jan 31, 2018
@josef-pkt
Copy link
Member Author

This pull request introduces 3 alerts - view on lgtm.com

new alerts:

  • 3 for Potentially uninitialized local variable

Comment posted by lgtm.com

@coveralls
Copy link

coveralls commented Jan 31, 2018

Coverage Status

Coverage decreased (-0.002%) to 82.169% when pulling 53a3518 on josef-pkt:betareg_rebased into c99558b on statsmodels:master.

@josef-pkt
Copy link
Member Author

still failures, looks like it fails when scipy <= 0.16 and passes with newer scipy. (bfgs changes again?)


results_class = getattr(self, 'results_class',
GenericLikelihoodModelResults)
genericmlefit = results_class(self, mlefit)
Copy link
Member Author

@josef-pkt josef-pkt Jan 31, 2018

Choose a reason for hiding this comment

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

Is this now generically implemented already in master?

see #2122
count_model uses result_class (which is missing an "s")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants