Skip to content

GenericLikelihoodModelResults for MixedLM #2436

Open

Description

@saketkc

I was looking into implementing likelihood ratio tests which already exists for linear model

Rather than simply duplicating it, I wanted to understand how this should be implemented so that such tests are available to other likelihood models too. [For e.g. GLM] And GenericLikelihoodModelResults seems to be an appropriate class, probably designed with this in mind?

cc @josef-pkt @kshedden

Activity

  1. kshedden commented on Jun 5, 2015

    @kshedden
    Contributor

    As far as I know this is not currently present at a high level in the results class hierarchy. Some models have a df_model attribute that you could use to calculate the degrees of freedom of the parent and sub-model. I'm not sure if you can generically test if the models are nested, we might have to trust the user on that. It might also be interesting to provide a generic way to use the F distribution rather than chi^2. Somewhere in the lmer mailing archives there is a lot of debate about how to calculate F distribution degrees of freedom for mixed models. There have also been some efforts to provide generic score tests, e.g. #2054.

  2. josef-pkt commented on Jun 5, 2015

    @josef-pkt
    Member

    The proper class for the LR test is LikelihoodModel. GenericLikelihoodModel is not used as a super class for our main models.

    The principle for the LR test is pretty generic, but in many cases there are recommendations of keeping some nuisance parameters (like variance or penalization-degrees of freedom, or weight matrices) fixed in the comparison. We are not supporting any of those in a generic LR test.

    The main reason I didn't put compare_lr_test higher up was that I didn't find a reference for unit tests across models,
    For GLM the LR test also works for quasi likelihood with over dispersion but the llf needs to be corrected by the dispersion estimate.

    (The main advantage of score and Wald test is that they extend to QMLE and don't require that the likelihood is correctly specified, while LR test does. So, the emphasis in my work in the last year was for those two tests and I didn't do much with LR tests.)

  3. josef-pkt commented on Jun 5, 2015

    @josef-pkt
    Member

    Additionally,
    neither Stata nor R has generic support for either LR or score tests, as far as I could see, so it is not so easy to just write unit tests to decide on and verify the results.

    So we need to find special cases to verify that a generic solution is doing what it's supposed to be doing.
    (And then it usually takes me a long time to feel confident enough or to make up my mind.)

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

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions