Marianne Stephan
2011-Nov-29 21:22 UTC
[R] Help in determining the formula for a mixed model analysis
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. Thanks! Marianne,Columbia SC [[alternative HTML version deleted]]
Ben Bolker
2011-Nov-29 22:12 UTC
[R] Help in determining the formula for a mixed model analysis
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
Apparently Analagous Threads
- SAS to R: I would like to replicate a statistical analysis performed in SAS in R.
- How can I refer to actual (n) and previous (n-1) elements in a vector?
- gsub patterns from vector elements w/out loop?
- cross tabulate variables by subject id
- Welcoming a new SIG member :)