# Mixed model

A mixed model is a statistical model containing both fixed effects and random effects. These models are useful in a wide variety of disciplines in the physical, biological and social sciences. They are particularly useful in settings where repeated measurements are made on the same statistical units (longitudinal study), or where measurements are made on clusters of related statistical units. Because of their advantage in dealing with missing values, mixed effects models are often preferred over more traditional approaches such as repeated measures ANOVA.

## History and current status

Ronald Fisher introduced random effects models to study the correlations of trait values between relatives.[1] In the 1950s, Charles Roy Henderson provided best linear unbiased estimates (BLUE) of fixed effects and best linear unbiased predictions (BLUP) of random effects.[2][3][4][5] Subsequently, mixed modeling has become a major area of statistical research, including work on computation of maximum likelihood estimates, non-linear mixed effect models, missing data in mixed effects models, and Bayesian estimation of mixed effects models. Mixed models are applied in many disciplines where multiple correlated measurements are made on each unit of interest. They are prominently used in research involving human and animal subjects in fields ranging from genetics to marketing, and have also been used in industrial statistics.[citation needed]

## Definition

In matrix notation a mixed model can be represented as

$\boldsymbol{y} = X \boldsymbol{\beta} + Z \boldsymbol{u} + \boldsymbol{\epsilon}$

where

• $\boldsymbol{y}$ is a known vector of observations, with mean $E(\boldsymbol{y}) = X \boldsymbol{\beta}$;
• $\boldsymbol{\beta}$ is an unknown vector of fixed effects;
• $\boldsymbol{u}$ is an unknown vector of random effects, with mean $E(\boldsymbol{u})=\boldsymbol{0}$ and variance-covariance matrix $\operatorname{var}(\boldsymbol{u})=G$;
• $\boldsymbol{\epsilon}$ is an unknown vector of random errors, with mean $E(\boldsymbol{\epsilon})=\boldsymbol{0}$ and variance $\operatorname{var}(\boldsymbol{\epsilon})=R$;
• $X$ and $Z$ are known design matrices relating the observations $\boldsymbol{y}$ to $\boldsymbol{\beta}$ and $\boldsymbol{u}$, respectively.

## Estimation

The joint density of $\boldsymbol{y}$ and $\boldsymbol{u}$ can be written as: $f(\boldsymbol{y},\boldsymbol{u}) = f(\boldsymbol{y} | \boldsymbol{u}) \, f(\boldsymbol{u})$. Assuming normality, $\boldsymbol{u} \sim \mathcal{N}(\boldsymbol{0},G)$, $\boldsymbol{\epsilon} \sim \mathcal{N}(\boldsymbol{0},R)$ and $Cov(\boldsymbol{u},\boldsymbol{\epsilon})=\boldsymbol{0}$, and maximizing the joint density for $\boldsymbol{\beta}$ and $\boldsymbol{u}$, gives Henderson's "mixed model equations" (MME):[2][4][6]

$\begin{pmatrix} X'R^{-1}X & X'R^{-1}Z \\ Z'R^{-1}X & Z'R^{-1}Z + G^{-1} \end{pmatrix} \begin{pmatrix} \hat{\boldsymbol{\beta}} \\ \hat{\boldsymbol{u}} \end{pmatrix} = \begin{pmatrix} X'R^{-1}\boldsymbol{y} \\ Z'R^{-1}\boldsymbol{y} \end{pmatrix}$

The solutions to the MME, $\textstyle\hat{\boldsymbol{\beta}}$ and $\textstyle\hat{\boldsymbol{u}}$ are best linear unbiased estimates (BLUE) and predictors (BLUP) for $\boldsymbol{\beta}$ and $\boldsymbol{u}$, respectively. This is a consequence of the Gauss-Markov theorem when the conditional variance of the outcome is not scalable to the identity matrix. When the conditional variance is known, then the inverse variance weighted least squares estimate is BLUE. However, the conditional variance is rarely, if ever, known. So it is desirable to jointly estimate the variance and weighted parameter estimates when solving MMEs.

One method used to fit such mixed models is that of the EM algorithm[7] where the variance components are treated as unobserved nuisance parameters in the joint likelihood. Currently, this is the implemented method for the major statistical software packages R (lme in the nlme library), statsmodels and SAS (proc mixed). The solution to the mixed model equations is a maximum likelihood estimate when the distribution of the errors is normal.[8][9]

## References

1. Lua error in Module:Citation/CS1/Identifiers at line 47: attempt to index field 'wikibase' (a nil value).
2. Lua error in Module:Citation/CS1/Identifiers at line 47: attempt to index field 'wikibase' (a nil value).
3. Lua error in Module:Citation/CS1/Identifiers at line 47: attempt to index field 'wikibase' (a nil value).
4. L. Dale Van Vleck. "Charles Roy Henderson, April 1, 1911 – March 14, 1989" (PDF). United States National Academy of Sciences.<templatestyles src="Module:Citation/CS1/styles.css"></templatestyles>
5. Lua error in Module:Citation/CS1/Identifiers at line 47: attempt to index field 'wikibase' (a nil value).
6. Henderson, C R (1973). "Sire evaluation and genetic trends" (PDF). Journal of Animal Science. American Society of Animal Science. 1973: 10–41. Retrieved 17 August 2014.<templatestyles src="Module:Citation/CS1/styles.css"></templatestyles>
7. Lua error in Module:Citation/CS1/Identifiers at line 47: attempt to index field 'wikibase' (a nil value).
8. Lua error in Module:Citation/CS1/Identifiers at line 47: attempt to index field 'wikibase' (a nil value).
9. Garrett M. Fitzmaurice, Nan M. Laird, and James H. Ware, 2004. Applied Longitudinal Analysis. John Wiley & Sons, Inc., p. 326-328.