0
$\begingroup$

Let's say I did a GLM including one categorical factor (let's say with three levels, so two indicator variables). In such a case, I understand that the interpretation of the p-value associated with each of the two variables (that is, the null hypothesis that each variable is testing) is different depending on how the factor was coded in the model. For example whether I used sum-coding, reference coding, etc. But the overall model remains the same, irrespective of coding system.

Now let's say I had a mixed model, and I wanted to get a p-value for each of the fixed effects. To do this I use a LLR-test to compare the log likelihoods of the model with and without the effect in question. My understanding is that the likelihood of a model is the same irrespective of how the independent variables were coded. If this is true, then I would not expect the LLR to depend on how the variable was coded either. Is this intuition correct? Does this mean that p-values from a LLR-test have a different meaning compared those obtained from a GLM?

$\endgroup$
2
  • $\begingroup$ Are you fitting the model with REML or ML? $\endgroup$
    – mdewey
    Commented Nov 20, 2020 at 13:07
  • 1
    $\begingroup$ Maximum likelihood, I read that the LLR is not valid for REML. $\endgroup$
    – tormad
    Commented Nov 20, 2020 at 13:26

1 Answer 1

0
$\begingroup$

I now understand my question was based on a misunderstanding. The likelihood of the full model will be independent of the coding, but the likelihood of the reduced/nested model will be affected. E.g. removing a factor will have a different impact on the likelihood if it is reference coded than if it is sum coded. I have tested this for myself with some example data.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.