Data Structure
> str(data)
'data.frame': 6138 obs. of 10 variables:
$ RT : int 484 391 422 516 563 531 406 500 516 578 ...
$ ASCORE : num 5.1 4 3.8 2.6 2.7 6.5 4.9 2.9 2.6 7.2 ...
$ HSCORE : num 6 2.1 7.9 1 6.9 8.9 8.2 3.6 1.7 8.6 ...
$ MVMNT : Factor w/ 2 levels "_Withd","Appr": 2 2 1 1 2 1 2 1 1 2 ...
$ STIM : Factor w/ 123 levels " arti"," cele",..: 16 23 82 42 105 4 93 9 34 25 ...
$ DRUG : Factor w/ 2 levels "Inactive","Pharm": 1 1 1 1 1 1 1 1 1 1 ...
$ FULLNSS: Factor w/ 2 levels "Fasted","Fed": 2 2 2 2 2 2 2 2 2 2 ...
$ PATIENT: Factor w/ 25 levels "Subj01","Subj02",..: 1 1 1 1 1 1 1 1 1 1 ...
$ SESSION: Factor w/ 4 levels "Sess1","Sess2",..: 1 1 1 1 1 1 1 1 1 1 ...
$ TRIAL : Factor w/ 6138 levels "T0001","T0002",..: 1 2 3 4 5 6 7 8 9 10 ...
Full Model Candidate
model.loaded.fit <- lmer(RT ~ ASCORE*HSCORE*MVMNT*DRUG*FULLNSS
+ (1|PATIENT) + (1|SESSION), data, REML = TRUE)
- Reaction times from trials are clustered within sessions, which in turn are clustered within patients
- Each trial can be characterized by two continuous covariates of ASCORE and HSCORE (ranging between 1-9) and by a movement response (withdraw or approach)
- Sessions are characterized by drug intake (placebo or active pharmacon) and by fullness (fasted or pre-fed)
Modeling and R Syntax?
I'm trying to specify an appropriate full model with a loaded mean structure that can be used as a starting point in a top-down model selection strategy.
Specific issues:
- Is the syntax correctly specifying the clustering and random effects?
- Beyond syntax, is this model appropriate for the above within-subject design?
- Should the full model specify all interactions of fixed effects, or only the ones that I am really interested in?
- I have not included the STIM factor in the model, which characterizes the specific stimulus type used in a trial, but which I am not interested to estimate in any way - should I specify that as a random factor given it has 123 levels and very few data points per stimulus type?