Repository navigation
robust covariance, cov_type in fit - #1870
Conversation
|
some problems in the design: Since we are changing some attributes in the results instance, we need to do it at the right time.
example NegativeBinomial nb uses log(alpha) internally but reports alpha. (This is different from models were the original parameterization is in transformed params, e.g. the link functions)
|
|
possible bug in code so far: how do we handle scale if it separately estimated. In a new set of test I'm comparing more GLM models to equivalent other models. Current test cases for MLE robust covariances have scale=1, Poisson, NegativeBinomial, and GLM also agrees with Logit. Difference between estimating equations with a canceled multiplicative term versus score/score_obs which should be the derivative of the full loglikelihood function. TODO: add score_obs and Hessian (correctly scaled) to RegressionModels, OLS,... |
…ults NegativeBinomial as test case, needs cleanup for code duplication.
…g, see PR comment)
389ee4d to
0bcc690
Compare
|
rebased and force pushed. comment to earlier comment:
scale wasn't a problem in the code when comparing GLM to OLS, Non-native scale will or might still be a problem in overdispersed Poisson, or when scale is fixed, but not here. Aside: score and Hessian of OLS have a division by the scale/sigma**2. |
|
TravisCI is green, I will merge this tomorrow. (work on documentation needs to wait.) |
There was a problem hiding this comment.
add use_self explicitly as keyword
docstring doesn't mention, attach to existing instance
There was a problem hiding this comment.
need to make docstring into template that can be copied to model methods
|
merging, see followup in #1922 |
ENH: robust covariance, cov_type in fit, in base, discrete and GLM
ENH: robust covariance, cov_type in fit, in base, discrete and GLM
integrating robust covariances into the model fit method, see issue #1418
summary issue for robust covariances is #1158
continuing after PR #1867
now starting with discrete models to build the generic version
two possible problems using a standalone function, e.g.
get_robustcov_results(res_olsg_._results, cov_type='HC1', use_self=True)use_self=Trueis only intended for use in a results.init when we can make sure we haven't used the cache yet, and internally we only have the results instance and not the wrapper.