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
Some models call some variant of get_robustcov_results at the end of fit (e.g. GenericZeroInflated, GeneralizedPoisson, NegativeBinomialP, NegativeBinomial). Others do this in XYZResults.__init__ (e.g. DiscreteResults,MLEResults, LikelihoodModelResults, GLMResults). There aren't many Results subclasses (VARResults, SVARResults, VECMResults come to mind) that don't inherit from LikelihoodModelResults, so that covers most everything.
So the question is: why do some models call get_robustcov_results in fit?
Can you put those review comments in a SUMM issue?
summary: I don't remember.
At some point NegativeBinomial needed special treatment, but I don't remember if that is still necessary. The new count models were written by Evgeny during GSOC following the pattern in NegativeBinomial. Cov_type in zero-inflated is not yet "supported", no unit tests yet, and I don't remember if I checked those. However, I expect that they work in the same way as the old NegativeBinomial.
As I mentioned before, cov_type needs another round of refactorings and enhancements, although I was thinking less of model specific cleanup and more of making the generic code more flexible to handle weights correctly. I need a day or three to think my way through the generic and the special cases again.
NegativeBinomial.fit has this comment
# Note: don't let super handle robust covariance because it has
# transformed params
I don't know if this is still applicable, but I recently opened other issues about problems in transformed params handling. Fixing some of those might make, or have made, the special case handling obsolete.
The generic cov_type support is only tested for linear regression, discrete models and OLS, and I checked GenericLikelihoodModel. Others work if they support the same interface, but might raise somewhere, if not.
(Aside: The main new use case for the new count models is predict. Those models need a correctly specified likelihood. So QMLE/cov_type for misspecified models is not as useful there as it is for the linear exponential family models like GLM, Logit, Poisson, one of the negbin, ...,)
(As justification why I spend a lot of time reviewing and fixing/finishing predict, and didn't pay a lot of attention to cov_type in those models.)
Can you put those review comments in a SUMM issue?
Sure. Maybe an Internal Consistency Topic Week?
BTW I tried getting rid of the calls to get_robust_cov in fit and added the relevant kwargs to the Results(...) constructor calls. Tentatively looks OK.
Activity
josef-pkt commentedon Oct 12, 2017
Can you put those review comments in a SUMM issue?
summary: I don't remember.
At some point NegativeBinomial needed special treatment, but I don't remember if that is still necessary. The new count models were written by Evgeny during GSOC following the pattern in NegativeBinomial. Cov_type in zero-inflated is not yet "supported", no unit tests yet, and I don't remember if I checked those. However, I expect that they work in the same way as the old NegativeBinomial.
As I mentioned before, cov_type needs another round of refactorings and enhancements, although I was thinking less of model specific cleanup and more of making the generic code more flexible to handle
weightscorrectly. I need a day or three to think my way through the generic and the special cases again.NegativeBinomial.fit has this comment
I don't know if this is still applicable, but I recently opened other issues about problems in transformed params handling. Fixing some of those might make, or have made, the special case handling obsolete.
The generic cov_type support is only tested for linear regression, discrete models and OLS, and I checked GenericLikelihoodModel. Others work if they support the same interface, but might raise somewhere, if not.
(Aside: The main new use case for the new count models is
predict. Those models need a correctly specified likelihood. So QMLE/cov_type for misspecified models is not as useful there as it is for the linear exponential family models like GLM, Logit, Poisson, one of the negbin, ...,)(As justification why I spend a lot of time reviewing and fixing/finishing predict, and didn't pay a lot of attention to cov_type in those models.)
jbrockmendel commentedon Oct 12, 2017
Sure. Maybe an Internal Consistency Topic Week?
BTW I tried getting rid of the calls to get_robust_cov in
fitand added the relevant kwargs to the Results(...) constructor calls. Tentatively looks OK.