I would appreciate some help figuring whether a linear mixed model (LMM) is a good choice for my data.
My experiment is a 3 (neurostimulation target) X 2 (task block) repeated measures design that takes place over 3 sessions on different days. I have data from 27 subjects. Each session involves a different neurostimulation target: A, B, or C. We are interested in how neurostimulation of these different targets affects response time in a behavioral task. So, a subject comes in, they complete a pre-stimulation block of the task, we administer the neurostimulation to one of the targets (A, B, or C), and then they complete a post-stimulation block of the task. Each block of the behavioral task is 10 minutes long and includes hundreds of trials. We would also like to add task time as a continuous predictor because we expect a change in response time over time within a sitting, and that this change will be modulated by stimulation target and/or block.
This design has several features that might make an LMM a good choice. The experiment is repeated-measures/within-subjects, all subjects experience all levels. The 10 minutes of the task occur within the task blocks, and the task blocks occur within the sessions. Because sessions take place on different days, comparing task blocks between sessions is confounded by individual differences between days, which might make being able to specify random effects helpful. Lastly, we are mixing categorical (stimulation target and task block) and continuous (task time) predictors.
Here are my questions:
- Is an LMM appropriate here? If so,
- Should I aggregate the data (i.e., take the mean for each subject, target, and task block)?
- Where does this design fall with respect to nesting or crossing?
- How should I specify my random effects structure to account best for individual differences between days?
Previous attempts with lmer in R:
model <- lmer(rt ~ target * block * time + (1 | sub/target/block), data = data, REML = TRUE)
This led to no errors. However with this model:
model <- lmer(rt ~ target * block * time + (1 | sub) + (1 | target) + (1 | block), data = data, REML = TRUE)
This led to (but maybe it is OK?):
optimizer (nloptwrap) convergence code: 0 (OK)
unable to evaluate scaled gradient
Hessian is numerically singular: parameters are not uniquely determined