Skip to content

SUMM roadmap 0.14 josef #7720

Open
Open

Description

@josef-pkt

Just trying to get a rough overview what I'm planning for 0.14

for What's new in 0.14

  • new count models: hurdle, truncated
  • new treatment effect
  • new features in count models, e.g. offset
  • new post-estimation, discrete models, GLM, BetaModel
    (see overview issue 7707 for coverage, notebook poisson for overview of features)
    • score_test
    • get_prediction
    • get_distribution
    • get_diagnostic (Poisson diagnostic and base diagnostic for other count models)
    • get_influence: how much of it is new?
    • internal (at least for now): delta method, _wald_test_nonlinear, ...
  • stats:
    • new functions for poisson rates
  • ...

smaller additions

  • information criteria, gbic, tic, .... (im_ratio advertise or not?)
  • ...

Activity

  1. added this to the 0.14 milestone on Sep 12, 2021
  2. josef-pkt commented on Sep 12, 2021

    @josef-pkt
    MemberAuthor

    maybe get started with basic dispersion models, Gaussian with heteroscedasticity MLE instead of GLS, negbin with dispersion link function.
    (Beta-Binomial ?)
    similar to BetaRegression

  3. josef-pkt commented on Sep 25, 2021

    @josef-pkt
    MemberAuthor

    I was looking at regression.dimred
    It's not advertised and looks like it's mainly for experts (and I don't know anything about it)

    Maybe there is a way to make it easier to consume and advertise.
    Looking at a similar python package https://github.com/joshloyal/sliced , it's not clear how to interpret it after looking at it only for a short time.

    My guess is that we need more usage examples.
    E.g. can we use it to predict (or get_distribution) for Poisson and binary regression?

    (That's maybe a bit similar to my underused PenalizedMixin and screening.)

  4. josef-pkt commented on Nov 2, 2021

    @josef-pkt
    MemberAuthor

    open: compare_score_test, compare_lr_test, ...

    linear_model has compare_lm_test and lr test

  5. josef-pkt commented on Nov 5, 2021

    @josef-pkt
    MemberAuthor

    more details and design questions

    • get_distribution (GLM has now 3 methods for it, results, model and family)
      • from "outside" creating simulation model
      • in sample from results, e.g. for diagnostics
      • out of sample from results, e.g. for reusing in get_prediction (needs to handle extra args like offset)
      • implementation might be better using families or dfamilies
    • get_diagnostic
      • this is mainly to figure out what is available for different models or categories of models
      • and then try to reuse generic code.
      • score_test versus some CMT (that don't use explicit model score, e.g. poisson doesn't have parameter for dispersion)
    • get_prediction
      • need to decide on structure mainly between endpoint transformation and generic delta method
      • location of helper functions ? e.g. "predict" functions that we can feed to NonlinearDeltaCov
      • families versus dfamilies: 2 different names for model attribute makes generic code more difficult. still undecided
      • overlap with margins, margins also has predict_at exog generation and options
      • first large refactoring and get_prediction for discrete in ENH/REF generic get_prediction #7870
    • get_influence

    semi-random thought: freq_weights_predict in get_prediction
    Assume we want to compute population weighted average prediction. i.e. predict weights differ from sample freq_weights.
    e.g. ATE versus ATT or ATE for a specific group or subset.

  6. josef-pkt commented on Nov 18, 2021

    @josef-pkt
    MemberAuthor

    diagnostics will be getting large, maybe a subdirectory would be helpful
    But I'm still not sure at what class/model hierarchy level we get useful methods.

    We will get quite a bit of overlap between genmod, discrete and othermod. and I have not yet looked at other models like survival (proportional hazard, mixedlm, ...)

  7. josef-pkt commented on Nov 19, 2021

    @josef-pkt
    MemberAuthor

    I want to get the multi-link Hetmodels #7793 merged as WIP so I can use them for diagnostic and other post-estimation results.
    We need enhanced .score_test for second moment, heteroscedasticity and dispersion tests.
    Designing api for dfamilies also will need several rounds and use cases for the design.

    e.g.
    GaussianHet for MLE based specification tests, instead of current least squares LM test.
    NegativeBinomial Poisson special case does not work, but we can have "excess heteroscedasticity" test (dispersion parameter depends on some exog)
    GPP: can have Poisson as special case (AFAIR, so we can have MLE score test for Poisson directly.

    Problem: we might have to use some numdiff derivatives if we don't have analytical derivatives

  8. josef-pkt commented on Dec 14, 2021

    @josef-pkt
    MemberAuthor

    todo after #7929

    • get_influence with resid_pearson and separate score residuals (full quadratic, darg-quadratic, scaled score_obs, and scaled (?) score_factor)
    • get_diagnostic: we need at least a basic diagnostic class for binary models
    • GLM: modernize prediction, predict, get_prediction depending on use of which. deprecate linear keyword. and prediction results class for GLM

    also a basic diagnostic class for continuous endog with gof plot, with BetaModel as case for development

    also PIT/quantile residuals and normal scores residuals

    not yet:

    • missing get_margeff in ZI models and OrderedModel
    • MNLogit, I ignored it in the current post-estimation improvements.

    Design for post-estimation for multivariate endog is still open:
    MNLogit has too much special casing inside discrete models. predict for OrderedModel will also be multivariate.
    We need a more generic pattern and supporting infrastructure.
    And, we still need more multivariate models with different structures to figure out what the common pattern will be.
    e.g. MV-MLE for gaussian and elliptical models (with fixed or estimated correlation matrix)
    I could expand robust Tyler scatter estimate to a full EllipticalLikelihoodModel with MVT as special case.
    I guess this will be similar to MNLogit in the structure, one exog, and multivariate params.
    We already have the stub version of multivariate ols.
    (SUR model?)

  9. josef-pkt commented on Dec 21, 2021

    @josef-pkt
    MemberAuthor

    I'm starting to tend towards adding a statsmodels.postestimation directory, where we can add new supporting code and eventually move and consolidate diagnostic, influence and ...(?) modules.

  10. josef-pkt commented on Dec 24, 2021

    @josef-pkt
    MemberAuthor

    A pep-8 cleanup in discrete would be useful when we don't have any open PRs for it.
    With open PRs, any cleaning causes a huge pain in merge conflicts.

  11. josef-pkt commented on Feb 13, 2022

    @josef-pkt
    MemberAuthor

    update all postponed to 0.15

    smaller PRs to take a break from big design decisions

    stats

    not small:

    models and related

    unclear

  12. josef-pkt commented on May 20, 2022

    @josef-pkt
    MemberAuthor

    2 smaller enhancements

    another one that looks relatively easy

  13. josef-pkt commented on Jun 22, 2022

    @josef-pkt
    MemberAuthor

    there are several recent PRs to review and merge

    and I need to check older open PRs (not mine) and issues to see what should still go into 0.14

    (my new notebook computer doesn't have a working dev environment yet, latest winpython has broken pytest,
    vacation coming soon - post-covid)

  14. josef-pkt commented on Nov 2, 2022

    @josef-pkt
    MemberAuthor

    after a few cleanup/refactoring, doc and notebook merges:

    todo, or to look at again and decide

  15. josef-pkt commented on Nov 26, 2022

    @josef-pkt
    MemberAuthor

    for release checking and notes: new link classes
    #8155 logc link merged
    other new ?

    reminder: mquantiles is a robust norm for RLM, not a link for GLM (I didn't remember correctly)

    I guess the only other links that I wanted are the flexible, parametric links, but I don't have code yet, AFAIR.

  16. josef-pkt commented on Nov 29, 2022

    @josef-pkt
    MemberAuthor

    still to do

    DiscreteModel.fit is using docstring of LikelihoodModel.fit
    This does not include cov_type keywords. Those are missing in DiscreteModels and subclasses.

  17. josef-pkt commented on Dec 1, 2022

    @josef-pkt
    MemberAuthor

    for release notes we need a list of type-bug-wrong for serious bugs in previous release
    e.g.

  18. josef-pkt commented on Dec 8, 2022

    @josef-pkt
    MemberAuthor

    pretty much done here

    The only one I'd like to get in is making GLM link check optional. #8569

    Also some recently added warnings might use UserWarning which only warns once, in contrast to our own Warning which warn always. needs checking.
    e.g. we have ValueWarning as alternative

  19. josef-pkt commented on Dec 10, 2022

    @josef-pkt
    MemberAuthor

    checking docstrings

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions