Skip to content

lme or lmer?

1 message · Antoine Tremblay

#
Giorgio, another thing regarding the Interval variable that came to my 
attention after reading Ben Bolker's reply to your question.

Were you planning on adding Interval to your model specification? 
Because it *shouldn't* be in the model. From what I can see, you'd be 
performing an analysis on the 200-300 time window, then another one on 
the 400-600 time window, and so forth, and in each analysis you'd 
include all electrodes (which, as I mentioned in my reply, is probably 
best re-coded as ROI with 9 levels).

I'm assuming you chose these time windows because you were expecting to 
find amplitude differences between your two conditions with respect to 
ERPs found in these time windows (e.g., maybe a late N400 in the 400-600 
window?).

So, for *each* time window the model would look something like this 
(after recoding Electrode to ROI and your datya frame is named eeg):

m1 <- lmer(Ampl ~ Condition * ROI + (1|Subject) + (1|Item) + 
(ROI|Subject), data = eeg)

Would check model assumptions using e.g., function mcp.fnc from package 
LMERConvenienceFunctions.

mcp.fnc(m1, trim = 2.5)

Typically the qq plot top right isn't good and there are a lot of data 
points with undue influence (bottom right panel). But after removing 
outliers +/- 2.5 std. dev. below and above the m1 residuals mean (could 
use function romr.fnc from package LMERConvenienceFunctions) the plots 
look much, much better.

eeg<- romr.fnc(model = m1, data = eeg, trim = 2.5)$data

Typically 1.5% to 2.5% of the data is removed this way (the function 
tells you the percentage). Then refit the model:

m1 <- update(m1)

Then look at the model criticism plot:

mcp.fnc(m1, trim = 2.5)


In addition, you could start with a simple model with only (1|Subject) 
then fit a more complex model with (1|Subject) + (1|Item) then a more 
complex one with (1|Subject) + (1|Item) + (ROI|Subject) ... and test 
whether the inclusion of the random effects is warranted using a log 
likelihood ratio test (anova(m1,m2) ...). I'd bet that (1|Subject) + 
(1|Item) + (ROI|Subject) will be warranted, maybe also (Condition|Subject).

Sincerely,

Antoine Tremblay
NeuroCognitive Imaging Laboratory
Dalhousie university
Halifax, Canada