Multilevel modeling: longitudinal data with within-subjects factors I have a data set with experimental data that I am analysing with multilevel modeling. Data are structured as follows: 


*

*24 Sessions

*6 Subjects per Session

*10 Rounds per Subject


There was one between-subjects variable (Role: three subjects each per Session were Role 0 and Role 1) and one within-subjects variable (Treatment). Treatment varied at the Round level: five rounds each were Treatment 0 and Treatment 1. Thus, data looks as follows:
> str(data)
$ Session             : Factor w/ 24 levels "1","2","3","4",..: 1 1 1 1 1 1 1 1 1 1 ...
$ Subject             : Factor w/ 144 levels "1","2","3","4",..: 1 1 1 1 1 1 1 1 1 1 ...
$ Round               : num  1 2 3 4 5 6 7 8 9 10 ...
$ Role                : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
$ Treatment           : Factor w/ 2 levels "0","1": 1 1 1 1 1 2 2 2 2 2 ...
$ Investment          : num  19 1 17 0 13 15 16 6 17 14 ...

I am fitting a three-level mixed-effects model using the R package lme4 and the function lmer() (largely following Douglas Bates' lme4 book). The following code is for a model with correlated random effects:
model.1 <- lmer(Investment ~ 1 + Treatment + Role + Round + 
                  (1 + Round|Subject) + (1 + Round|Session),
                data=data, REML=TRUE, na.action=na.omit)

Now, my longitudinal data consists of 2×5 Rounds per Subject, and the above code does not (in my understanding) take that into account. 
One attempt to remedy this was to recode the Round variable s.th. Round is numbered 1:5:
$ Round               : num  1 2 3 4 5 1 2 3 4 5 ...

However, I assume (but am not sure, for failure of finding relevant instructions/examples) that I would have to explicitly implement an interaction effect. Therefore my question: what would be the correct way to implement a multilevel model in which longitudinal data clustered within subjects is split by a within-subjects factor?
Simulated data and example code are here.
 A: I tried the sample code that you posted and the first model, in which Round goes from 1 - 10 fails. You don't get convergence and a lot of parameters come out as 0. Role=2 always corresponds to Round=6-10, which is the source of the problem.
You basically have 5 rounds for each Person/Treatment, so it's best to label the rounds 1 through 5, as you then did.
So now, your model predicts that the mean level of Investment depends on the sessions (randomly), the subject(randomly), the treatment and the role. There is also a linear effect in "Round" - the slope of Round varies in accordance with the subject and the session. 
You do not include any fixed interaction effects, or random ones. Nor is the relationship to Round affected by Treatment or Role.
A: I'm working on similarly structured data and am having the same issue. I had participants within groups/sessions, and also had (four) conditions within subjects and (five) rounds within conditions. I too am unsure of whether I should treat the data as 20 rounds (four conditions and five rounds per condition) or whether I should treat it as five rounds, repeated four times. 
What did you end up doing with your data? Any updates? Hearing what you ultimately did would likely help me out.  
