[R-sig-ME] Question about random-effects

Jorge Teixeira jorgemmtte|xe|r@ @end|ng |rom gm@||@com
Tue Feb 7 22:03:40 CET 2023


Dear Thierry Onkelin, thanks for the reply.

Do you have an opinion about which model best represents the context I have
described? That's my main doubt.

Thank you.

Thierry Onkelinx <thierry.onkelinx using inbo.be> escreveu no dia segunda,
6/02/2023 à(s) 20:07:

> Dear Jorge,
>
> It is more clear when you write the nested random effects explicitly
> instead of the shorthand.
>
> m2 has (1 | date) + (1 | date:session) + (1 | date:session:periode)
> m22 has (1 | session) + (1 | date:session) + (1 | date:session:periode)
>
> Both models have the same fit but a different parameterization.
>
> See my blog post on this topic
> https://www.muscardinus.be/2017/07/lme4-random-effects/
>
> Best regards,
>
> ir. Thierry Onkelinx
> Statisticus / Statistician
>
> Vlaamse Overheid / Government of Flanders
> INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RESEARCH INSTITUTE FOR NATURE AND
> FOREST
> Team Biometrie & Kwaliteitszorg / Team Biometrics & Quality Assurance
> thierry.onkelinx using inbo.be
> Havenlaan 88 bus 73, 1000 Brussel
> www.inbo.be
>
>
> ///////////////////////////////////////////////////////////////////////////////////////////
> To call in the statistician after the experiment is done may be no more
> than asking him to perform a post-mortem examination: he may be able to say
> what the experiment died of. ~ Sir Ronald Aylmer Fisher
> The plural of anecdote is not data. ~ Roger Brinner
> The combination of some data and an aching desire for an answer does not
> ensure that a reasonable answer can be extracted from a given body of data.
> ~ John Tukey
>
> ///////////////////////////////////////////////////////////////////////////////////////////
>
> <https://www.inbo.be>
>
>
> Op za 4 feb. 2023 om 13:36 schreef Jorge Teixeira <
> jorgemmtteixeira using gmail.com>:
>
>> Hi everyone.
>>
>> Context: Two groups (A and B) performed 30 treatment sessions. Each
>> session
>> has 4 periods.
>>
>> However, the wo groups did the intervention 6-months apart, with no
>> overlap.
>>
>> The model fit of both models is equal, but theoretically, one should make
>> more sense.
>>
>> Q1: Is m2 or m22 that captures this the best?
>>
>> Q2: the fact that I have fixed effect for group makes the previous
>> question
>> irrelevant somehow?
>>
>> Thanks!
>>
>>
>> m2 <- lmer(dp ~ session + period + group + (1 | id) + (1 | date /  session
>> /  period), data = dat_long )
>>
>> summary(m22)
>>
>> m22 <- lmer(dp ~ session + period + group + (1 | id) + (1 | session / date
>> / period), data = dat_long )
>>
>> summary(m22)
>>
>>         [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-sig-mixed-models using r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>>
>

	[[alternative HTML version deleted]]



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