Doug,

What Luca said is true. Follow the link with varios messages:

http://r-project.markmail.org/search/?q=test+random+effects+glmer

Walmes Zeviani.


________________________________
De: Luca Borger <lborger@uoguelph.ca>

>; R sig-mixed-models <r-sig-mixed-models@r-project.org>
Enviadas: Quarta-feira, 10 de Fevereiro de 2010 17:23:54
Assunto: Re: [R-sig-ME] anova on lmer object

Hello,

>hope it's ok then, that I'm testing random effects using a LR test
>where one model is fitted using lmer and the other using glm.

no, if I remember well. Please check the mail list archive, this issue has
been discussed in the past, also recently(-ish).


Cheers,

Luca


----- Original Message ----- 
From: "Doug Adams" <fog0@gmx.com>

<r-sig-mixed-models@r-project.org>
Sent: Wednesday, February 10, 2010 2:11 PM
Subject: Re: [R-sig-ME] anova on lmer object


Oh wait: when I fit the model without random effects I'm using glm,
and it doesn't give the option between REML and ML...  I'm guessing
the "iteratively reweighted least squares" method used to find
parameters for a glm doesn't have to do with ML techniques.  (?)   I
hope it's ok then, that I'm testing random effects using a LR test
where one model is fitted using lmer and the other using glm.

Thanks   :)


On Wed, Feb 10, 2010 at 11:52 AM, Doug Adams <fog0@gmx.com> wrote:
> Thank you Walmes,
>
> That makes sense; I read somewhere that REML removes the effects of
> fixed effects, essentially, and calculates parameters based on
> residuals. I'll use full Maximum Likelihood on both models then.
> When I'm testing for random effects, does the choice between REML and
> full ML matter when using a LR test?
>
> Best wishes,
>
>
> On Wed, Feb 10, 2010 at 4:11 AM, walmes zeviani

>> Doug,
>>
>> Test fixed effects by single term in anova() and test by likelihood ratio
>> test are different. In anova you are assuming that random effects 
>> estimates
>> are the parametric values, in other words, this test is conditional to 
>> the
>> random effects.
>>
>> When you want to test fixed effects by double term in anova (anova(m1, 
>> m0))
>> you must use maximum likelihood (lmer(y~x1+x2+(1|x3), REML=FALSE)). It's
>> because REML is based in function of the fixed effects and ML not.
>>
>> Using "1" in your simple model means adjust to the general mean.
>>
>> At your disposal.
>> Walmes Zeviani, Lavras, MG - Brasil.
>>
>> ________________________________
>> De: Doug Adams <fog0@gmx.com>

>> marianne.promberger@kcl.ac.uk; R sig-mixed-models
>> <r-sig-mixed-models@r-project.org>
>> Enviadas: Quarta-feira, 10 de Fevereiro de 2010 3:06:27
>> Assunto: Re: [R-sig-ME] anova on lmer object
>>
>> On Tue, Feb 9, 2010 at 4:32 PM, Doug Adams <fog0@gmx.com> wrote:
[[elided Yahoo spam]]
>>>
>>
>> If I only pass one model into the anova function, does it assume the
>> nested model being tested against is the one without fixed effects?
>>
>> And are the denominator degrees of freedom the ones listed in the output
>> table:
>> Df Sum Sq Mean Sq F value
>> division 2 103.59 51.793 1.0155
>>
>> If it's 2, am I correct in thinking that it's because my fixed effect
>> has 3 states, the first of which would be considered the baseline
>> against which the others are offset -- so it would exist in the model
>> without fixed effects? (So the baseline, and then the other 2
>> additional states for fixed effects...)
>>
>> One more question: If I want to explicitly spell out the simpler
>> model that doesn't have fixed effects so I can test for them, would
>> this be correct:
>> Complete Model: lmer(outcome ~ FixedEffect + (1|RandomGrouping),
>> data...)
>> Simplified Model: lmer(outcome ~ 1 + (1|RandomGrouping))
>>
>> so that "1" is like a placeholder for the first level?
>>
>> Goodness, thanks everyone for your patience with my endless questions.
>>
>> ________________________________
[[elided Yahoo spam]]
>> Celebridades - Música - Esportes
>

_______________________________________________
R-sig-mixed-models@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models


      ____________________________________________________________________________________
[[elided Yahoo spam]]

	[[alternative HTML version deleted]]


