[Paper Review] Autocorrelated errors in experimental data in the language sciences: Some solutions offered by Generalized Additive Mixed Models
This paper proposes using Generalized Additive Mixed Models (GAMMs) with autoregressive (ar1) error structures and factor smooths to address autocorrelated errors in language science experiments. By modeling non-linear random effects and explicitly accounting for time-series dependencies in residuals, GAMMs reduce anti-conservative p-values and produce more interpretable, stable nonlinear effects, as demonstrated in word naming, pitch contour, and EEG data analyses.
A problem that tends to be ignored in the statistical analysis of experimental data in the language sciences is that responses often constitute time series, which raises the problem of autocorrelated errors. If the errors indeed show autocorrelational structure, evaluation of the significance of predictors in the model becomes problematic due to potential anti-conservatism of p-values. This paper illustrates two tools offered by Generalized Additive Mixed Models (GAMMs) (Lin and Zhang, 1999; Wood, 2006, 2011, 2013) for dealing with autocorrelated errors, as implemented in the current version of the fourth author's mgcv package (1.8.9): the possibility to specify an ar(1) error model for Gaussian models, and the possibility of using factor smooths for random-effect factors such as subject and item. These factor smooths are set up to have the same smoothing parameters, and are penalized to yield the non-linear equivalent of random intercepts and random slopes in the classical linear framework. Three case studies illustrate these issues.
Motivation & Objective
- To address the widespread but often ignored issue of autocorrelated errors in experimental data from the language sciences.
- To demonstrate that standard linear mixed models may produce anti-conservative p-values when residual autocorrelation is present.
- To show that GAMMs offer two key tools—factor smooths and ar(1) error structures—for modeling non-linear random effects and autocorrelated residuals.
- To illustrate how correcting for autocorrelation leads to more accurate and interpretable estimates of nonlinear effects in real language science datasets.
- To advocate for GAMMs as a superior alternative to traditional models when time-series dependencies exist in behavioral or neurophysiological response data.
Proposed method
- Use of Generalized Additive Mixed Models (GAMMs) to model nonlinear relationships between predictors and response variables in language science data.
- Application of thin plate regression splines (tprs) and tensor product smooths (tp) to model smooth, wiggly effects of continuous predictors and their interactions.
- Implementation of factor smooths for random effects (e.g., subject, item) with shared smoothing parameters and penalization to mimic random intercepts and slopes in a nonlinear framework.
- Incorporation of an ar(1) error structure via the rho parameter in the mgcv package to explicitly model and correct for residual autocorrelation.
- Use of difference smooths to model contrasts between factor levels, analogous to treatment contrasts in linear models.
- Model comparison and residual diagnostics to assess the effectiveness of ar(1) and factor smooths in whitening residuals and improving model fit.
Experimental results
Research questions
- RQ1To what extent does residual autocorrelation in experimental response data lead to anti-conservative p-values in standard linear mixed models?
- RQ2Can factor smooths in GAMMs effectively model non-linear random effects for subjects and items when response patterns over time are not linear?
- RQ3Does including an ar(1) error structure in GAMMs significantly improve residual whitening and model validity in time-series data from language experiments?
- RQ4How does correcting for autocorrelation affect the functional form and interpretability of nonlinear effects in response latency, pitch contour, and EEG amplitude data?
- RQ5In what ways do GAMMs with ar(1) and factor smooths outperform traditional linear mixed models in capturing complex, time-dependent dependencies in language science data?
Key findings
- In word naming data, factor smooths for subjects captured non-linear performance trends over time, and an ar(1) rho of 0.3 was sufficient to whiten residuals and reduce autocorrelation.
- For pitch contour data, factor smooths alone failed to remove strong autocorrelation, requiring a high ar(1) rho (0.85–0.9) to achieve residual whitening.
- In EEG data, the inclusion of ar(1) errors transformed an initially complex, over-wiggly nonlinear surface into a simpler, more interpretable linear effect, particularly in the difference surface between conditions.
- The ar(1) model reduced overfitting and excessive wiggliness in partial effect plots, especially in the lower right corner of interaction surfaces, where noise was previously amplified.
- Removal of autocorrelation led to more conservative p-values and changed the functional form of effects, such that a non-linear interaction became clearly linear after correction.
- In one case, a significant time-by-fixed-factor interaction became non-significant after including factor smooths, indicating that the original significance was driven by unmodeled non-linear random effects.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.