Mixed Model Analyses with Interactions in the Random Effects Structure

I'm new to mixed models, and I'm having trouble trying to figure out what the random structure should be for a specific example.

I'm using a shooter bias task (the paradigm where subjects are faster to shoot an armed black target) and I am interested in a 3-way interaction between Target Race (Black/White), Target Object(Gun/NoGun), Inhibitory Ability (continuous variable where higher numbers are better inhibitory ability).

DV = Reaction time

Fixed Factor 1 = Target Race (dichotomous variable; repeated measure) Fixed Factor 2 = Target Object (dichotomous variable; repeated measure) Fixed Factor 3= Inhibitory Ability (continuous variable)

Random Factor = SubjectID

I am interested in the 3-way interaction, and while I understand the fixed factor model, specifying the random factor model has never made sense to me.

Assuming, I'll be using LME for R...

Reaction Time ~ Target Race + Target Object + Inhibitory ability+ all two-way interaction terms + three-way interaction term + ...random model....?

would the random model be something like (Target Race:Target Object:Inhibitory Ability | SubjectID)? I really don't get how to specify the random model. So, any help would be appreciated. Including readings on how to specify the random effects structure would be appreciated.

It depends on your experimental design, specifically, which of your predictor variables vary within subjects and which are characteristics of subjects. Guessing that inhibitory ability is a fixed characteristic of subjects (at least over the time scale of the experiment), and that you test each subject multiple times with different combinations of the other predictor variables (I think this is what you mean by "repeated measure" above), I would say that

Reaction Time ~ Target_Race*Target_Obj*Inhib+
(Target_Race*Target_Obj|SubjectID)


is probably what you want. That will work for lme4::lmer: for nlme::lme you would split the formula as follows

formula = Reaction Time ~ Target_Race*Target_Obj*Inhib,
random = Target_Race*Target_Obj|SubjectID


The fixed-effect specification gives you all main effects, two- and three-way interactions; the random-effect specification allows for variation in baseline (intercept), main effects of both target-specific variables, and their interaction among subjects.