When we reduce model complexity, mathematical equivalence at different levels of model complexity will be lost, because for reduced models goodness-of-fit depends on the specific VP(s) or CP(s) that are no longer in the LMM. In other words, as soon as we remove one or several VPs or CPs from the model, the mathematical equivalence may no longer hold.
In this script we decompose LMMs with sliding and sum contrasts for a fixed factor with 2 or 3 levels. The decomposition for the treatment contrast is already available. As an illustration we use the Machines data from package `MEMMS`. This is a follow-up to an RPub about a decomposition of linear mixed models with treatmen contrasts ([Kliegl, 2018f](http://www.rpubs.com/Reinhold/423709)).
Linear mixed models (LMMs) must negotiate the complexity of the model with amount of support by the available data. Often this requires that we determine a model of intermediate complexity, that is a parsimonious mixed model (Bates et al., 2015a, Matuschek et al., 2017). Here the focus is on the mathematical foundation of an LMM comprising a fixed factor f with levels A, B, and C and a random factor group g with levels drawn from a normal distribution. I use the default treatment contrast to estimate the mean of the base (A) and the two contrasts c1 = B - A and c2 = C - A as fixed effects and the corresponding variance parameters (VPs) and correlation parameters (CPs) in the random-effects structure. The demonstration reveals how the lmer syntax translates into the variance-covariance matrix of the random-effects structure. By forcing subsets of variance and correlation parameters to zero, I arrive at a sequence of nested LMMs.
For each of the contrasts (treatment, sliding difference, sum) I compute the contrast at the level of observations. We rename Machine to a factor VC for variance components. Then, I use these derived scores as input for the LMM with the `(0 + VC | Worker)` specification in FE and RE parts of the forumula to estimate variance and correlation parameters for the contrasts. The results should roughly agree with the results using the original observations in LMMs `(1 + VC | Worker)` specification.
The zero-correlation parameter linear mixed model (`zcpLMM`) serves as a reference point for various model comparisons of experimental data. It is of intermediate model complexity because, relative to maximal LMM (`maxLMM`) it estimates no correlation parameters and relative to the minimal LMM (`minLMM`) it retains all the variance parameters of the `maxLMM`. Given its role as a pivot model, it is important to have a clear understanding of its mathematical foundation.
This RPub is a follow-up to an RPub on factor contrasts and factor levels in linear mixed models (http://www.rpubs.com/Reinhold/391027). I describe ten LMMs and four hierarchical model sequences built from them.
Added correction of http://www.rpubs.com/Reinhold/22193 about invalid model comparison.
Follow-up to http://www.rpubs.com/Reinhold/22193
Linear mixed models are frequently overparameterized. A primary source of this problem are correlation parameters. Often these correlation parameters do not contribute to goodness of model fit (i.e., there is not enough evidence that they differ significantly from zero). The new double-bar syntax allows a convenient specification of zero-correlation-parameter linear mixed models in lmer().
Paper: Yan, M., Zhou, W., Shu, H., Yusupu, R., Miao, D., Kruegel, A., & Kliegl, R. (2014). Eye Movements Guided by Morphological Structure: Evidence from the uighur Language. Cognition, 132 (2), 181-215. URL: http://www.sciencedirect.com/science/article/pii/S001002771400047X Script is based on uighur_package.v2.R (available on Potsdam Mind Research Repository, also a preprint of the paper); see this script for details about computation of various derived variables (e.g., centering for LMMs, grouping for figures)