[R-sig-ME] Compute a repeated measures model in lme4

Mario Garrido gaiarrido at gmail.com
Mon Jun 8 20:18:00 CEST 2015


sorry, I reply without finishing my comments.
I am trying to compare the rate of change in O2 consumption in 2
consecutive days after a treatment (some individuals are treated while
others do not) days. This is my treatment variable.
daytype variable got 2 levels. the day before treatment and the day after
treatment
age variable are either juveniles or adults and time is time of teh day,
dark and night.

As I comparing the O2 consumption between day before and after. Random
effect should be  1|individual) or (1+time|individual)?


I always got the doubt.

thanks!

2015-06-08 21:12 GMT+03:00 Mario Garrido <gaiarrido at gmail.com>:

> This is really very useful, also what you tell about the random effect. I
> just wondering about it right now.
>
> Thanks very much. I will look at with detail and get back here if needed.
>
>
>
> 2015-06-08 20:53 GMT+03:00 Philippi, Tom <tom_philippi at nps.gov>:
>
>> Mario--
>> Yes your formula is redundant.  It may or may not describe the model you
>> are interested in.
>> Look at the documentation for formula specification:
>> * as in
>> treatment*daytype*time*age
>> includes both the individual main effects and the interactions up to the
>> 4-way interaction, so your other terms are already included.
>> : specifies an interaction.
>>
>> If you only want main effects plus those 3 2-way interactions, you can
>> use something like:
>> lme.mean7<-lmer(averageba~ treatment+daytype+time+age+
>>                              age:activity+ time:activity+treatment:
>> daytype+
>>                             (1|indiv), REML = FALSE)
>> Again, ?formula will help you with the syntax to specify the model you
>> are interested in.
>>
>> Also, think hard about your random effect.  While there are some repeated
>> measures models where (1|individual) is appropriate, in many cases
>> (1+time|individual) or equivalently (time|individual) is more appropriate
>> and informative.
>>
>> I hope that this helps get you pointed in the right direction.
>>
>> Tom 2
>>
>>
>> On Mon, Jun 8, 2015 at 1:07 AM, Mario Garrido <gaiarrido at gmail.com>
>> wrote:
>>
>>> ​Dear list,
>>> I am interesting in introduce in the same model ​these following groups
>>> of
>>> variables
>>> treatment*daytype*time*age
>>> age*activity
>>> time*activity
>>> treatment*daytype+activity
>>>
>>> Is this the correct way to do it? or is redundant and I get spurious
>>> results?
>>> lme.mean7<-lmer(averageba~ treatment*daytype*time*age+age*activity+
>>> time*activity+treatment*daytype+activity+(1|indiv), REML = FALSE)
>>>
>>> Thanks!
>>>
>>>         [[alternative HTML version deleted]]
>>>
>>> _______________________________________________
>>> R-sig-mixed-models at 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