[R] Help in determining the formula for a mixed model analysis

Ben Bolker bbolker at gmail.com
Tue Nov 29 23:12:46 CET 2011

Marianne Stephan <mariannestephan <at> hotmail.com> writes:

> Dear R and statistics experts:
> I have data of a behavioral experiment with the aim to 
> investigate the effect of a memory task on motor
> learning. 
> Question:
> I would appreciate help in figuring out a 
> possible formula to determine whether motor learning across
> sessions differs between 2 groups.
> Design:
> - 2 Groups: group A: n=10 subjects, group B: n=10
> - 6 motor learning sessions: baseline; immediately after 
> memory task; 6h, 24h, 30d later, and 30d later
> with a different motor task
> - dependent variable: response time (RT)
> I tried the following:
> (lme4 package of R, I assumed that 
> Subject is the random factor, and Session and Group the fixed factors.)
> fm1 <- lmer(RT ~ Session + Group + (1|Subject) + (1|Subject:Session), table)
> I would appreciate any help on the formula or the 
> choice of statistical approach.

   Please re-post to the r-sig-mixed-models at r-project.org list.
   Your basic approach looks reasonable; you should be able to
use (1|Subject/Session) [check whether the results are identical]
for this nested analysis.  May provide more comments in
the other forum.

  Ben Bolker

More information about the R-help mailing list