Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
ENH: Glm add score_obs #1781
so far just adds analytic (glm generic) score_factor and score_obs
related #1726 generic numerical derivatives in LikelihoodModel
score_factor is the same as score residuals in Stata.
I checked some examples against Stata, but unittests are against discrete and OLS/explicit
add Hessian, observed and expected (information matrix) should be relatively easy to add, but not yet done. DONE
added score_test to model, not yet to results, maybe it only stays at the model.
@kshedden In my last commit I added a score_test.
I haven't verified it yet against R, but it should roughly be a pattern that should work across models, (at least for cases where we can get score and hessian for new exog without creating a new model).
It can take either a constrained parameter, or add additional exog variables to the score to test for omitted variables.
Great. I will look this over. Hopefully we can make this (and your
In the case of GEE, we would override the score test method because GEE is
PHreg can probably use your score test code as-is. The wrinkle with PHreg
It would be nice to get my constrained fitting code out of GEE for
Constrained fitting in MixedLM is more complicated because there are
On Tue, Jun 24, 2014 at 11:57 PM, Josef Perktold firstname.lastname@example.org
We are going to work slowly to a pattern that will be generic enough, or different patterns to apply to most models.
One extension for GLM will be to take different (over/under dispersed) scale estimation into account, and the extra parameters for negative binomial and gamma.
Another extension is to use auxiliary regression based on the residuals for score/LM tests diagnostic tests. I started to look at those for discrete.Poisson, but they will apply in the same/similar way for GLM and others.
Another extension for GLM now that score and Hessian are available is to add scipy optimizers as fitting methods, both SAS and Stata use Newton-Raphson as default optimizer (I'm not completely sure it's the default in SAS or just an option).
My plan is to go back to robust covariances and finish connecting them to the models (now including GLM), after looking at some issues and PRs.