[R-sig-ME] Testing whether I need a random effect?
Milani Chaloupka
m.chaloupka at uq.edu.au
Wed Aug 18 03:51:08 CEST 2010
Ben
perhaps this is a one approach to test for random effect in the glmm:
1) fit poisson glm instead
2) extract residuals (type = "d")
3) add to dataframe
4) load nlme package
5) fit lme model with residual as the response var, 1 as the explanatory var (like ~1) and the random effect on RHS (like random ~1|trial)
6) fit lm model with residual as the response var and 1 as the explanatory var (no random effect included)
7) LLR test using anova for the lme model vs lm model (AIC and BIC also valid here)
8) viola??
Milani
On 18/08/2010, at 10:34 AM, Ben Bolker wrote:
> Christopher David Desjardins wrote:
>> Hi I have the following model:
>>
>> m.f <- glmer(NumCitations ~ 1 + Program + ProductType + ProductField +
>> (1 | ProductDate), family="poisson",data = data)
>>
>> And I am wondering how I can test whether or not ProductDate needs to
>> be included as a random effect or if I could just run a glm() without
>> ProductDate?
>>
> see http://glmm.wikidot.com/faq , "How can I test whether a random
> effect is significant?" (there aren't worked examples there -- anyone
> want to donate some?)
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
More information about the R-sig-mixed-models
mailing list