Timeline for Comparing a mixed model (subject as random effect) to a simple linear model (subject as a fixed effect)
Current License: CC BY-SA 2.5
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 17, 2011 at 21:17 | comment | added | MudPhud | They're not 0, just very small (~1e-6) compared to the observed (63.95). | |
Mar 17, 2011 at 21:08 | comment | added | lockedoff |
@MudPhud: Did you get any errors? Try typing lrt.sim to make sure they're not all zeros, in which case the most likely culprit would be that you don't have the package lme4 installed.
|
|
Mar 17, 2011 at 21:05 | comment | added | MudPhud | Thanks for the code. When I ran it the result is none of the bootstrapped LRTs are greater than the observed, so this means that I can stick to the lm without the random effects or even the original variable thrown in. | |
Mar 17, 2011 at 20:55 | comment | added | lockedoff | @ocram +1 for your comment on deciding whether to treat the variable as random or fixed separately from the analysis. @MudPhud If your PI doesn't understand the issue and insists on a p-value, then maybe just show him the result of the test of the random effect (which you would include anyway in the write-up). | |
Mar 17, 2011 at 20:50 | history | edited | lockedoff | CC BY-SA 2.5 |
updated deprecated R syntax
|
Mar 17, 2011 at 20:46 | comment | added | ocram | Thank you for completing my answer. Also, sometimes people use a mixture of chi-squares instead of a chi-square distribution for the test statistic. | |
Mar 17, 2011 at 20:43 | history | answered | lockedoff | CC BY-SA 2.5 |