Consider the General Linear Model

Example:

A1	A2	A3	
Y11	Y12	Y13	
Y21	Y22	Y23	
		
n=2

The General Linear Mixed Model is just a modification of the this model,

Where

Consequently, Y is also normally distributed,

Now, consider the design above with repeated measures.  The model for this design is

Multivariate Normality
	The vector Y is multivariate normal with density function

where
.
Accordingly,  the log likelihood function is

We must maximize the ln L function in respect to 
				 and V
to obtain the ML estimators for the fixed and random parameters.

To obtain estimates inside the parameter space, we
assume that the variance components are known (random parameters), and obtain the ML estimators for the fixed parameters:

It can be shown that the variance of these estimators is 
.
Because variance components are not known, but estimated,  the variances of the fixed parameters are generally underestimated.  

Estimating the Variance Components
	We want now to estimate the variance components without having to specify the fixed factors (since we estimated the fixed factors assuming that we knew the variance components).   However, when we look at the ln L we see that it depends on the fixed and random factors.  So, we can’t work with the likelihood function.  However, we can modify the likelihood such that it does not depend on the fixed factors and yields unbiased estimators of the variance components.  This is done with what is called Restricted Maximum Likelihood estimation.  

	Restricted ML
		It can be shown that we can obtain unbiased ML estimators of the variance components by maximizing the following log likelihood function
		
	.