Skip to content

"J" in GEEMargins? #3671

Closed
Closed

Description

@jbrockmendel

GEEMargins.summary checks J = int(getattr(model, "J", 1)) in order to shape its output properly. This looks unnecessary, since J is not defined anywhere else in that module (and I'm not aware of it being used elsewhere). Is there some way to reach this case?

It may be that this is a copy-paste from discrete_margins.DiscreteMargins.summary. AFAICT DiscreteMargins.summary is not hit in any tests.

Activity

  1. kshedden commented on May 16, 2017

    @kshedden
    Contributor
  2. josef-pkt commented on May 16, 2017

    @josef-pkt
    Member

    maybe cleaning this and making it model specific is not a good idea, if we want a generic solution that works for all relevant models, GLM, GEE and discrete, and some future models.

  3. josef-pkt commented on May 16, 2017

    @josef-pkt
    Member

    But I never looked specifically what could be made more generic.

  4. jbrockmendel commented on May 17, 2017

    @jbrockmendel
    ContributorAuthor

    In my "screw backward compatibility" branch I've got a module where I've gathered all of the summary, summary2, summary_frame, ... methods and tried to de-duplicate their content. The savings is non-trivial, but not enough to warrant putting effort into convincing others to adopt it.

    Highlights:

    • sarimax, structural, varmax, and dynamic_factor can all share an identical get_prediction method.
    • discrete_margins and generalized_estimating_equations.GEEMargins can share a summary_frame and summary methods.
    • Most of the conf_int methods can be merged.
    • PredictionResults classes in regression._prediction, genmod._prediction, and mlemodel can all share summary_frame. (In fact, genmod._prediction is completely eliminated).

    While I don't think this one merits trying to push upstream, I did the same thing with a) standard errors related methods and b) loglike/score/hessian methods, and in those cases I think there's a lot of value in using inheritance more aggressively.

  5. added this to the 0.10 milestone on Oct 4, 2017
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