I've been searching for a question that answers this for about a week on Cross Validated. Apologies if it's a repeat; I appreciate being pointed to an answer in a pre-existing question.
My experiment is a repeated measures design (also a fully-crossed design, I think) where each subject was tested at two different time points (T1 and T2). Data is in "longform" with two rows per subject, one for each time point. We measured different contextual factors (predictors) and a behavioral measure (outcome variable). All measures were administered at both time points. We are interested in whether the contextual factors are related to the behavior. The reason they were measured at two time points is because we're also interested in the stability/reliability of the behavior over time. We expect the contextual factors (things like hunger, tiredness) to vary between time points for any given individual.
While setting up the MLM in R, I structured it as follows:
FullModel <-lme(OutcomeVariable ~ 1 + Time + Hunger + Tiredness + Stress + Thirst, data = longFormData, random = ~Time|Person, method = "ML", na.action = na.exclude, control = list(opt="optim"))
It's my understanding that this will make Hunger, Tiredness, Stress, and Thirst fixed predictors and will allow for random slopes for each Person between Time Points.
(Please assume I ran the ICC with a random intercept model and I can see that there's a sizable proportion of within-subject variance to be accounted for in OutcomeVariable).
I've been trying to figure out whether my FullModel accounts for the fact that the two observations in Hunger, Tiredness, etc are coming from the same individual. If so, there's nothing to change. If not, I may need to add extra random effects for the predictors that exhibit a large proportion of within-subject variance (as measured by their ICC). I want to "tell" the model that this is a repeated measures design for each fixed predictor. Conceptually, I think of this as something like Hunger + Hunger|Person + Tiredness + Tiredness|Person + Stress + Stress|Person + Time + Time|Person etc. If it's needed, I'd appreciate specific suggestions about how to do this in R.
As I almost understand it, OutcomeVariable is allowed to vary between T1 and T2 within Person (random slope), but each fixed predictor is only adding a information about the intercept (pushing the line up and down but not adjusting the slope at all). My naive understanding is that if there's a lot of variation in my predictors between T1 and T2, it would be helpful to have them also influencing the slope. It would be helpful to have an explanation in terms of what is happening to the regression lines with each type of predictors if that is incomplete or inaccurate.