Skip to content

ENH: compare_score_test for variable addition #3916

Open

Description

@josef-pkt

just another idea

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

  1. added this to the 0.11 milestone on Dec 4, 2018
  2. josef-pkt commented on Dec 4, 2018

    @josef-pkt
    MemberAuthor

    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.

  3. modified the milestones: 0.11, josef on Oct 5, 2019
  4. josef-pkt commented on Nov 12, 2020

    @josef-pkt
    MemberAuthor

    https://cran.r-project.org/web/packages/statmod/index.html
    has a glm.scoretest function for variable addition that only needs the null model

    there should be a newer issue where this reference should go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions