Modelling Non-linear Relationships in ERP Data Using Mixed-effects Regression with R Examples
Newman, Aaron J.
MetadataShow full item record
The relationship between two variables is very often assumed to be a straight line. However, there are many problems for which this assumption does not hold. In this paper, we show that the assumption of linearity, an assumption commonly made in ERP research, comes at a cost and may significantly affect the quality of the inferences drawn from the data. We demonstrate why the assumption of linearity should be relaxed and how to model non-linear relationships between ERP amplitudes and predictor variables using restricted cubic splines and mixed-effects regression. This paper has been written in LaTeX using Sweave and R, and the source document is provided as supplementary material. The data, a pdf of this paper, the .Rnw file used to write it, and the R code used to generate all of the analyses, tables, and figures presented here are available in package EEGLMERdata. The package is available as supplementary material for this article, and also from DALSPACE. These resources can be used to work through the examples, and potentially act as a starting point for the reader's own forays into mixed-effects analysis.