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

Mario Garrido gaiarrido at gmail.com
Mon Jun 8 20:41:30 CEST 2015


What a complete review of my study! Thanks very much. I got open Zuur
(2007) in this moment.

Mario

2015-06-08 21:38 GMT+03:00 Philippi, Tom <tom_philippi at nps.gov>:

> The draft R-sig-mixed FAQ has some guidance on testing random effects (and
> LRT via anova are not recommended):
> http://glmm.wikidot.com/faq
>
> Be careful.  In my applications of repeated measures to ecological data,
> one model or the other for random effects is justified by the structure of
> the sampling or experiment, and by the question of interest, not by
> parsimony.
>
> Also, if your O2 measurements have cyclic/periodic responses to time of
> day, at the least I urge you to spend quality time with papers or books,
> such as Faraway's "Extending the linear model" or Wood's "Generalized
> additive models" or perhaps one of Zuur's, to fully understand the
> differences between treatments in the data that are estimated or tested by
> different models.
>
> Ecologically, you may be more interested in specific parameters about the
> O2 consumption: integrated 24hr consumption, estimated peak consumption,
> shifts in time of peak consumption, rate of ramping up of consumption (your
> rate of change of O2 might be a ramping up or ramping down following some
> exertion).
>
> Tom 2
>
> On Mon, Jun 8, 2015 at 11:18 AM, Mario Garrido <gaiarrido at gmail.com>
> wrote:
>
>> 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