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
{{ message }}
Repository navigation
ENH: compare_score_test for variable addition #3916
if we have a full, unrestricted model available, then we can get score and cov from the unrestricted model.
The score_test under correctly specified likelihood is easy then to compute. That's simpler then constructing the score test from the restricted model using score_factor and hessian_factor, especially in the case with extra params as in GeneralizedPoisson, NegativeBinomial or zero-inflated models.
(We have one version in linear regression model and in GLM, but LEF has zero expected cross derivatives with variance and is therefore simpler, i.e. only mean parameters and only linear predictor, score_factor is univariate/scalar series.)
information needed is that we get the restricted parameter estimates. User can provide it, or we can default to filing with zeros for the simple case of variable addition, if we either use some properties of the data or the param_names to identify which parameters are zero under the restricted model.
example two-sample score test for count variables:
We have (in master or PR) standalone tests for binomial and poisson. However, if there is over-
or under-dispersion, then the test does not have the correct distribution.
A simple case would be to estimate NegativeBinomial or GeneralizedPoisson and test for an indicator variable. Wald test is trivial, but score_test has often better small sample properties.
Activity
josef-pkt commentedon Dec 4, 2018
this issue might be now superseded by more general version of score_test
e.g. #4716 (open) and related cmt score test PRs already merged.
API design and which methods or functions to add for special cases of score/LM/CMT tests are still open questions.
AFAIR, I used several examples in experimental notebooks.
josef-pkt commentedon Nov 12, 2020
https://cran.r-project.org/web/packages/statmod/index.html
has a
glm.scoretestfunction for variable addition that only needs the null modelthere should be a newer issue where this reference should go