[R-sig-ME] Testing whether I need a random effect?

Christopher David Desjardins desja004 at umn.edu
Wed Aug 18 03:45:10 CEST 2010

On 08/17/2010 07:34 PM, 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?)

Thanks Ben.

The library RLRSim and the function exactRLRT(). However, when I run 
that function I get the following message:

 > exactRLRT(m.f)
Using restricted likelihood evaluated at ML estimators.
  Refit with method="REML" for exact results.
Error in if (rlrt.obs != 0) { : missing value where TRUE/FALSE needed

Does this function not work with the glmer() and the Poisson family?

More information about the R-sig-mixed-models mailing list