Skip to content

ENH/REF: GLM.score_test scale handling #4694

Open

Description

@josef-pkt

refactor and test scale handling in GLM.score

  • comment in docstring
    not yet verified for case with scale not equal to 1.
    check normal, gamma and others work correctly. scale handling in loglike and score have been refactored and fixed in statsmodels 0.9

  • allow QMLE excess-dispersion for poisson and families with scale=1

Activity

  1. added this to the 0.10 milestone on May 30, 2018
  2. josef-pkt commented on May 30, 2018

    @josef-pkt
    MemberAuthor

    as workaround to try this out

    resccds = modcd.fit_constrained('x5=0, x6=0', scale='x2')   #scale option doesn't work
    resccds.model.scaletype = 'x2'  # this seems to work, pvalue close to robust wald test
    lm = resccds.model.score_test(resccds.params, k_constraints=2, exog_extra=None)
    print(lm)
    print('statistic: %6.3F, pvalue: %6.3F, df: %d' % lm)
    
  3. josef-pkt commented on Dec 31, 2018

    @josef-pkt
    MemberAuthor

    needs checking, this is most likely fixed
    do we have unit tests?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions