0
$\begingroup$

I have performed LRT:

> (lL1 <- logLik(mixedModel))

'log Lik.' -65435.99 (df=4)
> (lL2 <- logLik(linearModel<-lm(y~x)))

'log Lik.' -78234.86 (df=3)
> ((Delta <- as.numeric(lL2-lL1)))

[1] -12798.86
> pchisq(- 2 * Delta, 1, lower.tail = FALSE)

[1] 0

How can I understand that 0 from chi-square? Are random effects are statistically important?

$\endgroup$

1 Answer 1

3
$\begingroup$

First, your Delta is negative - a clue that you did something wrong!

Your mixed model has 4 df and the linear one has 3, suggesting it is appropriate to subtract the other direction, yielding a positive difference. However, I don't know what your mixed model is. It is only right if your linear model is nested in the the mixed model.

$\endgroup$
1
  • $\begingroup$ linear model is nested in mixed, difference between them is only random effect $\endgroup$
    – user46703
    Commented Aug 23, 2014 at 19:24

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.