Repository navigation
Open
Description
Just trying to get a rough overview what I'm planning for 0.14
- diagnostics, score tests
- missing pieces in discrete (avoiding PRs that get too large or widespread).
- main difficulty will be writing unit tests. R and Stata don't have comprehensive diagnostics, in R spread out across many
packages score test, missing pieces for discrete "basic" models, Logit, Probit and Poisson, (other models later)fit constrained, should be easy/generic after adding missing pieces in discrete.get_influencemostly generic for "basic" discrete after missing pieces have been addedget_diagnosticsbasic diagnostic classes, where we can add more tests as they become available.- specific groups of diagnostic tests, e.g. reset tests
- delta method, predict, test ENH delta method and nonlinear prediction and test #2296, updated in REF/ENH delta method and nonlinear wald test rebased #7758
get_prediction, 7166 -> ENH: Diagnostic class rebased #7597 includes it for Logit and Poisson- profile confint ENH: GLM profile confidence intervals #1791
- merged
- ENH: Diagnostic class rebased #7597 merged
- Discrete scorefactor offset rebased3 #7825 merged
- REF/ENH delta method and nonlinear wald test rebased #7758 merged
- ENH/REF generic get_prediction #7870 merged
- REF/ENH: add CountResults.get_diagnostic #7895 merged
- ENH/BUG: get_prediction for more models and cases #7900 merged
- ENH/REF: Scoretest betareg #7907 merged
- ENH: MLEInfluence for two-part models, extra params, BetaModel #7912 merged
- ENH/REF: discrete add get_distribution, add which="var" for NBP, GPP #7929 merged
- ENH: add get_influence to DiscreteResults #7951 merged
- ...
- ...
- almost finished PRs from last year's updating
- ENH: robust add MQuantileNorm #3183 merged
- ...
- ...
- distribution:
- extend archimedean copulas to k_dim > 3, pdf for k_dim <= 4, unit tests for k_dim=3
- add new models
- multilink and dispersion models ENH: add multilink models and distribution.dfamilies #7793
- heckman
- Tobit, generic exogenously censored/truncated ?
- truncated, hurdle count models
- ENH: Truncated, hurdle count model rebased #7973 merged
- follow-up: still needs work, check extra options, cleanup
- treatment effect
- MVGenExtremeModel ? Copula regression model
- accelerated failure time ?
- user friendly models for e.g. Penalized Mixin, sure independence screening ENH: add penalized classes, cases for penalized mixin #7128
- mixed mixin maybe WIP ENH: Mixed mixin2 #5502
- ...
- stats ?
- Refactoring ?
- GMM ?
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
josef-pkt commentedon Sep 12, 2021
maybe get started with basic dispersion models, Gaussian with heteroscedasticity MLE instead of GLS, negbin with dispersion link function.
(Beta-Binomial ?)
similar to BetaRegression
josef-pkt commentedon Sep 25, 2021
I was looking at
regression.dimredIt'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.)
josef-pkt commentedon Nov 2, 2021
open: compare_score_test, compare_lr_test, ...
linear_model has compare_lm_test and lr test
josef-pkt commentedon Nov 5, 2021
more details and design questions
get_distribution(GLM has now 3 methods for it, results, model and family)get_diagnosticscore_testversus some CMT (that don't use explicit model score, e.g. poisson doesn't have parameter for dispersion)get_predictionget_influencesemi-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.
josef-pkt commentedon Nov 18, 2021
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, ...)
josef-pkt commentedon Nov 19, 2021
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_testfor second moment, heteroscedasticity and dispersion tests.Designing api for
dfamiliesalso 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
josef-pkt commentedon Dec 14, 2021
todo after #7929
predict,get_predictiondepending on use ofwhich. deprecatelinearkeyword. and prediction results class for GLMalso 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:
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?)
josef-pkt commentedon Dec 21, 2021
I'm starting to tend towards adding a
statsmodels.postestimationdirectory, where we can add new supporting code and eventually move and consolidate diagnostic, influence and ...(?) modules.josef-pkt commentedon Dec 24, 2021
A pep-8 cleanup in
discretewould be useful when we don't have any open PRs for it.With open PRs, any cleaning causes a huge pain in merge conflicts.
josef-pkt commentedon Feb 13, 2022
update all postponed to 0.15
smaller PRs to take a break from big design decisions
stats
in private module, need to check if there are better unit tests against R
one public function in contingency, private randomization module
AFAIR, written as a more generic version of multinomial confint, but I ran into problems, direct implementation was merged
fudgeterm #3716not small:
undecided: separate test or clean up option in existing Multi comp class
models and related
unclear
josef-pkt commentedon May 20, 2022
2 smaller enhancements
another one that looks relatively easy
ENH: robust jarque-bera normality (skew and kurtosis) tests, including multivariate #8286 (comment)
josef-pkt commentedon Jun 22, 2022
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)
josef-pkt commentedon Nov 2, 2022
after a few cleanup/refactoring, doc and notebook merges:
todo, or to look at again and decide
whichjosef-pkt commentedon Nov 26, 2022
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.
josef-pkt commentedon Nov 29, 2022
still to do
(do I add confint for 0.14? where did I stop looking at confint? moved to 0.15)
merged PR: ENH: Tweedie loglike #8560
DiscreteModel.fit is using docstring of LikelihoodModel.fit
This does not include cov_type keywords. Those are missing in DiscreteModels and subclasses.
josef-pkt commentedon Dec 1, 2022
for release notes we need a list of type-bug-wrong for serious bugs in previous release
e.g.
josef-pkt commentedon Dec 6, 2022
still possible
updated pull Ref/ENH misc, smaller fixes or enhancements #8567
pull Ref/ENH misc, smaller fixes or enhancements #8567
josef-pkt commentedon Dec 8, 2022
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
ValueWarningas alternativejosef-pkt commentedon Dec 10, 2022
checking docstrings
linkclasses don't have docstring for__call__(not clickable) e.g. https://www.statsmodels.org/dev/generated/statsmodels.genmod.families.links.Logit.htmlupdate I don't see a way to fix this. FAQ-D/SUMM transformation functions current code and location #7244 (comment)
check_linkkeyword to docstringR->(0, 1)maybe for 0.15f, notf**2