# (G)LME on EEG data: distribution not fitting, assumptions of normally distributed, i.i.d. residuals not met, what to do?

this is my first post on this forum, so please let me know if you need more details. Would be really glad for some advice! I have data that I want to model using LME. I tried to find a good fit for my data using the Cullen and Frey graph and fitdistrplus, but it doesn't fit any that are available in lme4 family.

(Just now I tried library("metRology") fit_good <-fitdist(N400largeMAomit,"t.scaled"start=list(df=3,mean=mean(N400largeMAomit),sd=sd(N400largeMAomit))) and this fit very nicely, but 1) I'm not entirely sure this is the right approach and if the number of df put in here makes a difference and 2) I cannot implement it in a mixed effects model - I also tried using heavyLmer, since I read that it uses student t distribution, but I keep getting errors and I couldn't find discussion or much documentation about it online)

Fit of normal (Gaussian) distribution:

Fit of regular t distribution:

I just tried using the lmer function which assumes normality and to do the forward step approach to find a good model, using anova(fit1, fit2) and comparing AIC, BIC and Chi-Squared for my models. I was hoping that, if I find a good model, then maybe the residuals of the error would look better. After a lot of comparison, I ended up with a pretty complicated model, but if I plot the Q-Q-plot and Tukey-Ascombe plot, they don't seem to be independently or normally distributed at all.

I've tried using the log of my dependent variable, but then the model didn't converge. Also, this is problematic since my dependent variable contains negative values and I have to add 100 to it or so. Can I still use this model or what shall I do?

Some more details: The data is EEG-ERP data in response to people translating single words from one language to the other (both directions tested) - the dependent variable is the ERP component N400's mean amplitude over a certain time window for a selection of electrodes. Explanatory variables are Group (Germans vs. Cantonese), Direction of Translation, Age, Proficiency (LexTALE), Ratings of properties of the words (ConcStimMeanAccGroup and FamStimMeanAccGroup), Locations of Electrodes (Laterality and Domain). Random effects: Subject and individual words.

The model I used now: (but I also tried other ones and more simple ones and the plots don't look better for them either...) fmGDmAgeIGDmDirLexFamConcIGLatDomI <- lmer(N400 large Mean(250.00->500.00ms)~ GroupDomainElRowAge+GroupDirectionDomainElRowLexTALE+GroupDomainElRowFamStimMeanAccGroup+GroupDomainElRowConcStimMeanAccGroup+GroupDomainElRowLexTALELateralityLCR+(1|Subject)+(1|UnifiedWordNo), data=GrandERPtable, REML=FALSE)

fit.weibull$aic: 1383386; fit.norm$aic: 1327076; fit.gamma$aic: 1329998; fit.log$aic: 1332664; fit_good$aic (adjusted t-distribution using metRology): 1308352; fit.t$aic: 1488789; fit.cauchy\$aic: 1356255

I also have a second question, namely: once I have decided on my model, what is the best way to do additional post-hoc tests, so that I can actually say more about the impacts of the different factors...? I find it hard to interpret since the model is complex and there are many interactions and significances. Also, I need to correct for multiple testing. Do I have to do Bonferroni on all the p-values or only on the electrodes (which are the ones that there is multiple data on in the independent variable...)?

• Sorry, it cut off my 'Hi everyone' :) – userC Mar 17 '18 at 1:56
• for the second question: I have tried summary(glht(fmGDmAgeIGDmDirLexFamConcIGLatDomI, linfct = mcp(Group = "Tukey")), test = adjusted("holm")), but I get this error: Error in mcp2matrix(model, linfct = linfct) : Variable(s) 'Group' of class 'numeric' is/are not contained as a factor in 'model'. I want to keep Group in my model (I realize it's just 1 or 2 - 1 for Germans, 2 for Cantonese), but don't know how I can get a result... – userC Mar 17 '18 at 7:17