You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Yes, I basically copied this from somewhere (GLM or discrete, can't recall
now) and never got around to testing it much. If someone has time to clean
it up that would be great.
On Tue, May 16, 2017 at 3:45 PM, jbrockmendel ***@***.***> wrote:
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.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3671>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/ACiww6hFXx8ljObJnJm5CQzTtNJzTAf3ks5r6fzpgaJpZM4Nc_To>
.
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.
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.
Activity
kshedden commentedon May 16, 2017
josef-pkt commentedon May 16, 2017
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.
josef-pkt commentedon May 16, 2017
But I never looked specifically what could be made more generic.
jbrockmendel commentedon May 17, 2017
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:
get_predictionmethod.summary_frameandsummarymethods.conf_intmethods can be merged.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.