6
$\begingroup$

I am using the nlme package in R to use mixed effects models to analyze multilevel (i.e., students nested within classrooms) data.

I am confused about interpreting the log likelihood output from these functions, and while there are other questions that address why the log is taken of the likelihood statistic and why it is negative, it is not clear how these apply to interpreting these values.

In particular, a negative log likelihood is output. Since estimation methods maximize the log likelihood, I understand a larger value indicates better fit.

Does this interpretation apply to the (negative) log likelihood output, so that a larger (i.e., closer to 0) value indicates better fit, so that if I were comparing, for example, log likelihood values of -3146.9 and -2931.41 using the anova() function, and a likelihood ratio test indicated a test statistic associated with a p-value less than .05, then the model with the log likelihood of -2931.41 demonstrates better fit?

$\endgroup$
1
  • 1
    $\begingroup$ No. we minimise the negative log likelihood. $\endgroup$
    – ABCD
    Mar 31, 2017 at 13:37

2 Answers 2

11
$\begingroup$

We take the log-likelihood because each case in the dataset gets a likelihood, and the log-likelihood is the product of these likelihoods. But each of these likelihoods is less than 1, and when you multiply lots of numbers less than 1 together you tend to get really, really small numbers.

Nothing wrong with those really small numbers - except that we hit precision limits on the computers that we use. Try exponentiating your log-likelihoods of -3000 and -2000. I suspect that your computer will say that they are both zero - so the likelihood of both models is zero - and they are indistinguishable.

So instead of trying to multiply lots of values togehter, it is easier to take their logs, and add them together. So we don't get a likelihood, we get a log-likelihood, and we don't hit precision limits.

Then @PlayStarCraftOkLetsGo's answer.

$\endgroup$
0
3
$\begingroup$

We try to minimise the negative log-likelihood function, which is equivalent to maximising the log-likelihood function. The model with the lower negative log-likelihood value would be a better fit.

$\endgroup$
3
  • $\begingroup$ By smaller, we mean smaller in absolute value, not smaller as in more negative, correct? $\endgroup$ Apr 9, 2017 at 14:10
  • $\begingroup$ I think it should be smaller, as in more negative, the better model. $\endgroup$
    – babipsylon
    Jan 18, 2020 at 17:26
  • $\begingroup$ Lower, rather than smaller. $\endgroup$ Apr 25, 2022 at 16:52

Your Answer

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

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