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

Philippi, Tom tom_philippi at nps.gov
Mon Jun 8 19:53:03 CEST 2015


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