Repository navigation
Description
When we start with estimating or moment equations, then the derivative is not necessarily symmetric, in contrast to when we start from a likelihood maximization problem.
This case is implemented, but no example or test case yet.
I don't have currently a test case case for score_test or CM test that is not likelihood based. In some cases I'm not sure whether I use the right upper or lower off-diagonal block. In the symmetric Hessian case it didn't matter.
e.g. in the case with score_deriv_cu versus score_deriv_uc
reading Breslow again, cited in stats._diagnostic_other
Breslow, Norman. 1989. “Score Tests in Overdispersed GLM’s.” In Statistical
Modelling, edited by Adriano Decarli, Brian J. Francis, Robert Gilchrist, and
Gilg U. H. Seeber, 64–74. Lecture Notes in Statistics 57. Springer New York.
http://link.springer.com/chapter/10.1007/978-1-4612-3680-1_8.
In the joint specification of mean and variance, Breslow uses the estimating equations directly. The moment equation for the variance function is based on pearson_residual function or in a second version an a pseudo-likelihood base moment equation.
The partial derivatives of the moment condition is zero for mean parameter with respect to variance parameter, but nonzero for variance parameter with respect to mean parameters.
That implies that we can separate the mean parameter estimate from the variance assumption but not vice-versa.
It's not clear to me when we can ignore that mean parameters are estimated when testing heteroscedasticity and correlation. Breslow includes the effect. In Gaussian we can ignore it. AFAIR, the Poisson dispersion tests also ignore it.
(I don't remember the details, but it's related to symmetry and third moment. I need to check GMM again when just working with arbitrary moment conditions.)
Breslow has the long linalg formula for variance of the score for the dispersion parameter when it is "model-based", i.e. under the assumption of correctly specified variance, but it is not clear to me what the "empirical" i.e. robust version is. Difference is on whether we use empirical 3rd and 4th moment or model based (e.g. mu4 in Poisson, similar to sigma4 for Gaussian.)
I don't have an example yet for MLE based variance function robust score test, e.g. testing dispersion parameter in GeneralizedPoisson under the Null that dispersion is Poisson special case.
AFAIR, Poisson is in the interior of the parameter space for GPP, in contrast to NegativeBinomial.
Overdispersion test in Poisson are essentially CM tests, and the generic framework with asymmetric score_deriv is not completely finished or tested.
related
#4716 add score-test to models
#2096 added background computation for score/LM and CM tests
Activity
[-]ENH/TST: score/LM and CM tests based one estimating equations or GMM[/-][+]ENH/TST: score/LM and CM tests based on estimating equations or GMM[/+]josef-pkt commentedon Jul 20, 2020
stats._diagnostic_otheris not in docs. (I wanted to check the rendering of docstrings.)most of those functions are internal, but dispersion_poisson should be public.
I didn't make that public because I didn't decide how to handle the different versions in API, options and returns.
josef-pkt commentedon Feb 16, 2023
for GMM: test of additional/added moment restrictions
I did this in one of my GMM notebooks based on McFadden notes, but this articles has it more explicit.
(I got initially confused when I added moment conditions and results didn't change)
Ahu, Seung C., and Peter Schmidt. “A Separability Result for GMM Estimation, with Applications to GLS Prediction and Conditional Moment Tests.” Econometric Reviews 14, no. 1 (January 1, 1995): 19–34. https://doi.org/10.1080/07474939508800301.
general result is adding moment restrictions and the same number of parameters leaves the original parameter estimates unchanged
p. 26 equ (19) looks at the specific case of adding a moment condition with a "slack" variable
h(theta) - deltawhere theta is old and delta is added parameter.