1.1 The linear mixed model framework
1.3 Advantages of the mixed model
The general linear model is a commonly used statistical tool in agricultural research to study the relationship between a normally distributed dependent or response variable and one or more independent variables. The independent variables can be either continuous or discrete. If an independent variable is assumed to be discrete, it only takes a restricted number of values, being the levels of the variable, and the effect of each level of the discrete variable generates a separate parameter in the model. On the other hand, if an independent variable is assumed to be continuous, an underlying functional relationship is assumed between the independent variable and the response variable; the number of model parameters corresponds to the number of parameters in the function describing the underlying relationship. The simplest and most popular relationship is the linear association, described by two parameters, the intercept and the slope. In some cases, an investigator has to decide whether the independent variable is continuous or discrete, as illustrated in the following example.
Assume a calf is weighed each week during a period of 6 weeks. If a linear relationship between weight and time is assumed, time is a continuous independent variable and two model parameters, the slope and the intercept, describe the linear relationship. If, however, no continuous relationship between weight and time can be assumed, time can be defined as a discrete variable, with each weekly weighing being a level of the time variable and generating a model parameter. Thus six model parameters are needed in this example, one for each week.
The model parameters arising from either a continuous or a discrete independent variable can be fixed or random effects (remark that we slightly abuse the term parameter (which cannot be a stochastic variable) so that it can be used for all the effects in the model apart from the error term). We will restrict here to the case of a discrete independent variable. If the levels of the independent variable that occur in the study are considered to be the only levels of interest, each level has a fixed effect on the response variable and the independent variable is known as a fixed effects factor.
If the levels, however, are considered to be a random sample from the population of all possible levels, each level has a random effect on the response variable and the variable is known as a random effects factor. Some experiments consist only of fixed effects factors, apart from a random error term. These experiments can be modelled by a fixed effects model. Other experiments, which contain only random effects factors, apart from an overall mean, can be modelled by a random effects model. Many experiments, however, contain both fixed and random effects factors. The appropriate model for the analysis of these experiments is the mixed model.
The effect of two different drugs against trypanosomosis is compared. Animals within a herd are randomly assigned to the two drugs. The drug is a fixed effects factor with two levels, and thus a fixed effects model can be used to analyse the data with the random error term in the model describing the variation among animals within drug. If, however, insufficient animals can be recruited for the study from an individual herd, more than one herd must be taken and, within each herd, animals randomly assigned to one of the two drugs. Herd may be assumed to be a random effects factor if the aim of the study is to generalise more widely to all herds in similar conditions. This experiment can thus best be analysed by a mixed model.
The fixed effects model has been used more often than the mixed model in the past, even to describe and analyse experiments which contain both random and fixed effects factors. A typical example is the analysis of a split-plot design. Milliken and Johnson (1992) describe the difficulties arising when analysing a split-plot design by the fixed effects model. The mixed model methodology was first developed for animal genetics research (Henderson, 1990). In recent years, however, the mixed model has also been introduced in different disciplines to analyse experiments with more complex data structures. The aim of this book is to show how the mixed model can be used in veterinary research in which the response variable is normally distributed, and to emphasise the advantages of the mixed model compared with the fixed effects model. Parallel developments of mixed models have taken place in other disciplines such as sociology and education. There, mixed models are called hierarchical models (Bryk et al., 1992) and multilevel models (Goldstein, 1995).
The examples used for illustrative purposes are based on experiments undertaken at the International Livestock Research Institute (ILRI). In Chapters 1 and 2, we have, for convenience, only used subsets of the data, and in some cases generated new data in order to highlight specific points of the mixed model methodology. In Chapter 3, however, we use real and complete data sets.
Examples 1.2.1–1.2.5 are based on experiments undertaken to compare the efficacies of different drugs on trypanosomosis in cattle, a parasitic disease that can result in death if not treated. The disease is transmitted by tsetse flies and when animals are infected they often become anaemic. A variable often measured to evaluate the severity of the disease is the packed cell volume (PCV), which is the percentage of the volume of the blood serum taken up by the red blood cells. Low PCV corresponds to anaemia and can indicate infection with trypanosomes. Experiments have been undertaken to compare the efficacies of two trypanocidal drugs, diminazene acetate (Berenil) and isometamidium chloride (Samorin) in an area where there is evidence of trypanosomes demonstrating some resistance to treatment. For this reason, Samorin, a drug generally used prophylactically was compared with Berenil, a curative drug, to see whether it invoked a longer period of temporary recovery in PCV. Depending on the design of the experiment, different models must be fitted, but it will be shown that the mixed model framework provides a unified way to describe each of these experiments.
Example 1.2.6 is based on data generated by a diagnostic test that determines the concentration of Samorin in cattle over periods of time.
Example 1.2.7 describes a field experiment to study the genetic inheritance of natural resistance to helminthiasis in sheep.
Finally, in Example 1.2.7 the changes over time of PCV in animals experimentally infected with trypanosomes are studied and compared for two different cattle breeds, N'Dama and Boran.
The aim of the study is to compare the efficacies of high, medium and low doses of Berenil when applied to cattle in a herd shown to be infected with the parasite. The response to treatment is measured as the difference between the PCV measured on the day of treatment and the PCV one month later (Table 1.2.1 and Appendix A, Example 1.2.1).
Table 1.2.1 PCV (%) in animals infected with trypanosomes before the application of a low, medium or high dose of Berenil and one month after.
Animal |
Dose |
PCVbefore |
PCVafter |
Difference |
1 |
L |
17.4 |
19.3 |
1.9 |
2 |
L |
18.7 |
18.9 |
0.2 |
3 |
L |
15.8 |
19.2 |
3.4 |
4 |
L |
16.4 |
19.9 |
3.6 |
5 |
L |
16.6 |
17.8 |
1.1 |
6 |
M |
16.8 |
22.6 |
5.9 |
7 |
M |
17.3 |
19.7 |
2.4 |
8 |
M |
17.5 |
20.2 |
2.7 |
9 |
M |
15.2 |
19.5 |
4.3 |
10 |
H |
18.0 |
25.7 |
7.7 |
11 |
H |
16.8 |
25.1 |
8.3 |
12 |
H |
18.3 |
25.2 |
6.9 |
13 |
H |
17.8 |
22.8 |
5.0 |
14 |
H |
15.8 |
26.1 |
10.2 |
Figure 1.2.1 The difference in PCV (%) before and one month after the application of a low, medium or high dose of Berenil
It can be seen from Figure 1.2.1 that the increase in PCV after one month of treatment is highest for the high dose and lowest for the low dose.
The aim of the study is to compare two doses of Berenil, but with animals sampled from a wider number of herds so that the investigator may be able to make broader conclusions across the regions where the herds are situated. The same response variable is measured as before (Table 1.2.2). The data set is also shown in Appendix A, Example 1.2.2. Differences in responses between high and low doses in each herd are illustrated in Figure 1.2.2.
Table 1.2.2 The difference in PCV (%) before and one month after the application of a low or high dose of Berenil given to trypanosome-infected animals in different herds.
Herd 1 |
Herd 2 |
Herd 3 | |||
L |
H |
L |
H |
L |
H |
0.9 |
7.4 |
2.3 |
6.6 |
3.4 |
8.8 |
2.0 |
6.8 |
2.7 |
7.1 |
2.7 |
8.3 |
2.0 |
7.1 |
1.3 |
6.2 |
2.8 |
7.9 |
2.2 |
6.7 |
1.6 |
7.8 |
3.0 |
8.2 |
2.0 |
7.9 |
2.1 |
7.2 |
3.4 |
8.1 |
Figure 1.2.2 The difference in PCV (%) before and one month after the application of a low or high dose of Berenil given to trypanosome-infected animals in different herds.
It can be seen from Figure 1.2.2 that a high dose leads to better recovery of PCV. There is also evidence of some herd to herd variation, herd 3 showing generally a higher increase in PCV, both for the low and high dose, than the other herds. This herd to herd variability needs to be taken into account when developing the statistical model.
Different drugs against trypanosomosis exist. The aim of the study is to compare response to treatment with Samorin with that with Berenil. In this study it was considered practically easier to assign herds at random to treatment of one of the two drugs, rather than use both drugs simultaneously within herd. Therefore, each animal treated in a particular herd received the same drug. The data are given in Appendix A, Example 1.2.3.
Table 1.2.3 The difference in PCV (%) before and one month after the application of Berenil or Samorin to infected animals in different herds
Herd 1 Drug=Berenil |
Herd 2 Drug=Berenil |
Herd 3 Drug=Samorin |
Herd 4 Drug=Samorin |
7.1 |
6.9 |
6.8 |
8.0 |
6.6 |
6.3 |
6.9 |
8.1 |
5.8 |
7.6 |
7.6 |
7.1 |
6.3 |
7.7 |
7.9 |
6.9 |
6.4 |
7.6 |
7.5 |
8.2 |
7.0 |
7.1 |
6.8 |
7.7 |
7.3 |
7.5 |
7.0 |
7.6 |
There are variations in responses within herds and also some herd to herd variability if we compare herd 1 and herd 2 (Table 1.2.3) which are both treated with Berenil. There seems to be little evidence for a significant difference in mean response between drugs (Figure 1.2.3).
Figure 1.2.3 The difference in PCV (%) before and one month after the application of Berenil or Samorin to infected animals in different herds
This study compares two drugs, both given at a low and a high dose. As in the previous example the different drugs are assigned to the different herds, but animals within herds are assigned at random to one of the doses. The data are shown in Table 1.2.4 and Appendix A, Example 1.2.4.
Table 1.2.4 The difference in PCV (%) before and one month after the application of different doses of Berenil or Samorin to infected animals in different herds
Herd 1 |
Herd 2 |
Herd 3 |
Herd 4 | ||||
L |
H |
L |
H |
L |
H |
L |
H |
2.5 |
6.9 |
3.6 |
6.3 |
2.9 |
7.0 |
4.6 |
7.7 |
1.6 |
6.8 |
3.0 |
7.7 |
2.5 |
6.7 |
3.5 |
8.6 |
3.5 |
7.2 |
4.0 |
7.3 |
2.3 |
7.6 |
4.1 |
8.1 |
2.6 |
5.9 |
3.3 |
8.3 |
2.8 |
6.8 |
3.9 |
7.7 |
2.8 |
6.5 |
3.5 |
7.8 |
2.7 |
7.2 |
4.0 |
8.7 |
Figure 1.2.4 The difference in PCV (%) before and one month after the application of different doses of Berenil or Samorin to infected animals in different herds
Again there is a large difference in response between the high and low doses, irrespective of which drug is used (Figure 1.2.4).
This study compares again two drugs, both given at a low and a high dose. The main difference from the previous example is that the herds in the field experiment come from six different regions, so that more general conclusions can be drawn. Within each region, two herds are randomly chosen and one herd is randomly assigned to Berenil, the other to Samorin. Within each herd, an infected animal is randomly assigned to a high or a low dose and treated. Only the average responses of animals treated with the low or the high dose of the assigned drug within a herd are available, and the response consists of the mean herd PCV one month after treatment (Table 1.2.5; Appendix A, Example 1.2.5).
Table 1.2.5 Average PCV (%) values one month after the application of different doses of Berenil or Samorin to infected animals in different herds within different regions
Drug | |||||
Berenil |
Samorin | ||||
L |
H |
L |
H | ||
Region |
1 |
21.8 |
22.6 |
16.4 |
19.1 |
2 |
28.8 |
29.0 |
18.2 |
25.3 | |
3 |
23.7 |
24.0 |
16.0 |
19.5 | |
4 |
26.3 |
27.7 |
16.6 |
21.9 | |
5 |
23.3 |
28.3 |
19.3 |
25.2 | |
6 |
21.8 |
21.1 |
16.3 |
17.9 |
Figure 1.2.5 Average PCV (%) values one month after the application of different doses of Berenil or Samorin to infected animals in different herds within different regions
The average PCV of animals treated with Berenil appears to be higher. Furthermore, the average PCV of Samorin-treated animals appears to be higher if the high dose is given (Figure 1.2.5).
An ELISA (Enzyme-linked immuno-sorbent assay) is being used to determine the concentration in blood of Samorin at various times following treatment. Results are expressed as an optical density value (OD), which is correlated with the concentration of Samorin. An experiment was set up to determine the distribution of the OD values for untreated animals. This information was needed to determine a cut-off point for the test, below which it can be assumed that zero concentration of Samorin is present. This experiment studies how OD values vary both within and among animals. The experiment consisted of 4 animals. Each animal was measured at 11 different time points and at each time point two blood samples were taken as shown in Table 1.2.6. The data are also listed in Appendix A, Example 1.2.6.
Table 1.2.6 ELISA OD values for different animals measured repeatedly over time
Time |
Replicate |
Animal number | |||
1 |
2 |
3 |
4 | ||
1 |
1 |
0.910 |
0.806 |
0.675 |
0.639 |
2 |
0.923 |
0.807 |
0.685 |
0.639 | |
2 |
1 |
0.929 |
0.743 |
0.682 |
0.581 |
2 |
0.907 |
0.746 |
0.686 |
0.584 | |
3 |
1 |
0.924 |
0.802 |
0.708 |
0.560 |
2 |
0.918 |
0.803 |
0.703 |
0.564 | |
4 |
1 |
0.929 |
0.820 |
0.649 |
0.572 |
2 |
0.927 |
0.828 |
0.631 |
0.582 | |
5 |
1 |
0.876 |
0.819 |
0.696 |
0.619 |
2 |
0.875 |
0.825 |
0.684 |
0.640 | |
6 |
1 |
0.911 |
0.752 |
0.709 |
0.600 |
2 |
0.914 |
0.760 |
0.704 |
0.603 | |
7 |
1 |
0.919 |
0.753 |
0.668 |
0.604 |
2 |
0.937 |
0.750 |
0.659 |
0.587 | |
8 |
1 |
0.906 |
0.738 |
0.684 |
0.602 |
2 |
0.906 |
0.754 |
0.688 |
0.605 | |
9 |
1 |
0.952 |
0.817 |
0.690 |
0.544 |
2 |
0.954 |
0.803 |
0.690 |
0.565 | |
10 |
1 |
0.975 |
0.808 |
0.731 |
0.628 |
2 |
0.961 |
0.802 |
0.716 |
0.613 | |
11 |
1 |
0.923 |
0.789 |
0.711 |
0.618 |
2 |
0.930 |
0.793 |
0.705 |
0.618 |
Figure 1.2.6 ELISA OD values for different animals measured repeatedly over time
Duplicate samples measured on the same animal at the same time are very similar (Figure 1.2.6) and the variability between the two measurements is smaller than that over time. Finally, the variation among measurements taken from a specific animal is smaller than that among different animals.
Helminthiasis is a disease in sheep caused by helminths (intestinal parasites) which can cause severe losses in production and death of infected animals. Some animals within a breed are more resistant to intestinal parasites than others. A small part of such a data set that has been collected to demonstrate this is shown here, where lambs that are offspring of different sires have been studied under high helminth challenge. The response variable included in this example is body weight at weaning (Table 1.2.7; Appendix A, Example 1.2.7).
Table 1.2.7 The weaning weights (kg) of lambs from different sires
Sire | |||||||
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
11.1 |
15.9 |
11.8 |
17.6 |
17.8 |
14.6 |
13.4 |
13.6 |
10.8 |
13.0 |
10.8 |
20.2 |
13.3 |
10.7 |
17.0 |
12.1 |
11.3 |
12.6 |
12.4 |
19.1 |
12.6 |
10.6 |
18.3 |
15.6 |
14.6 |
14.3 |
16.3 |
15.8 |
13.9 |
12.8 | ||
13.6 |
15.8 |
13.5 |
13.0 |
13.0 | |||
12.5 |
18.8 |
12.7 |
12.9 | ||||
15.7 |
18.5 |
||||||
12.9 |
|||||||
14.6 |
- |
Figure 1.2.7 The weaning weights (kg) of lambs from different sires
There is some variation in weaning weights of offspring of the same sire and also additional variation among offspring of different sires (Figure 1.2.7).
The N'Dama breed of cattle is not affected as severely by trypanosomosis as some other breeds. Changes in PCV following experimental infection with trypanosomes have been studied to demonstrate differences in susceptibility between the N'Dama and Boran breeds. A subset of the data is shown in Table 1.2.8 and Appendix A, Example 3.3).
Table 1.2.8 PCV (%) at the beginning and end of a series of 14 different times following experimental trypanosomal infection in N'Dama and Boran
Breed |
Animal |
Days following infection | ||||
0 |
2 |
|
31 |
35 | ||
Boran |
36.2 |
35.9 |
|
21.3 |
17.8 | |
2 |
35.9 |
38.5 |
|
21.3 |
18.1 | |
3 |
29.5 |
33.3 |
|
22.6 |
20.4 | |
4 |
28.5 |
27.6 |
|
19.4 |
17.2 | |
5 |
30.4 |
29.5 |
|
19.1 |
18.5 | |
6 |
33.7 |
36.2 |
|
17.5 |
15.9 | |
N'Dama |
1 |
30.4 |
33.0 |
|
24.5 |
22.6 |
2 |
37.5 |
37.8 |
|
25.2 |
28.7 | |
3 |
32.4 |
30.4 |
|
26.1 |
22.9 | |
4 |
34.3 |
33.0 |
|
23.9 |
22.6 | |
5 |
30.4 |
32.1 |
|
26.1 |
24.2 | |
6 |
40.4 |
37.5 |
|
28.7 |
26.1 |
For both cattle breeds there is a downward trend in PCV over time after infection (Figure 1.2.8). The decrease in PCV in Boran cattle, however, is greater than in N'Dama cattle. In modelling this data structure, it must be taken into account that measurements over time, taken on the same animal, are correlated. This will be described in Chapter 3.
Days following Infection
Figure 1.2.8 Changes in PCV following infection of N'Dama and Boran cattle
Specific features of mixed models include:
In this section we give a non-mathematical discussion of these features. The mathematical treatment and the evidence for the advantages of mixed models are given in the subsequent chapters. Disadvantages and advantages of mixed models are also compared in Duchateau (1997).
The fixed effects model describes adequately the simplest experiment, the completely randomised design. Once the design becomes more complex, such as the randomised block design, the mixed model can often be considered to be more appropriate for describing the data structure. In this context, the block effect is considered as a random effect. The blocks present in the study are randomly selected from the population of blocks. Therefore the specific block levels are not of interest but the variance of the distribution (typically normal) that describes the random block effect is the important parameter. This variance is one of the components of the variance of the response variable. The classical fixed effects model cannot handle random effects. Complex data structures are described in a natural way in the mixed model framework (Duchateau, 1997). The data set of Example 1.2.4, for instance, has such a complex data structure. In this experiment herds are random effects, to which one of the two drugs is randomly assigned. Recognising that the herd factor can be a random effects factor is important, both for understanding the structure of the data set and for the correctness of the subsequent statistical analysis, as will be shown later.
We revisit Example 1.2.4. A mixed model description of this data set is given by
Yijkl = µ + δi + hij + Tk + yik + eijkl
where, for i = 1, 2; j = 1, 2; k = 1, 2; l =1, ..., nijk,
Yijkl is the difference in PCV (=PCVafter -PCVbefore)
µ is the overall mean
δi is the effect of the Berenil (δ1) or Samorin (δ2) treatment
hij is the effect of herd j to which drug i has been assigned
Tk is the effect of the high (T1) or low (T2) dose of Berenil or Samorin
Yik is the interaction between drug and dose
eijkl is the random error of animal l with drug i at dose k in herd j
The fixed effects parameters are µ, δi, Tk and Yik, whereas hij and eijkl are random effects; the assumptions are
the hij are iid N(0,σ)
the eijkl are iid N(0,σ2)
the hij and eijki are independent
where iid stands for identically and independently distributed.
When herds are selected for the experiment at random, it is clear that herd is a random effect. Therefore, the fixed effects model cannot describe the experiment in a correct way.
There are important differences in the way the analysis is done in the fixed effects model and the mixed model. In the fixed effects model, the only source of randomness is the random error term. Therefore, fixed effects parameters can be estimated by minimising the sum of the squared random error terms. This is called the ordinary least squares criterion. Hypotheses with regard to fixed effects are tested by comparing the ratio of each mean square to the error mean square with the F-distribution.
The mixed model methodology is based on different techniques. The simple ordinary least squares criterion cannot be used as there are different random effects factors and thus different sources of randomness. The estimation of the fixed effects is therefore based on the generalised least squares criterion, which takes into consideration the different sources of randomness. In the generalised least squares criterion expression, the variance components corresponding to the different sources of randomness are first estimated by the restricted maximum likelihood criterion (Patterson and Thompson, 1971) and then substituted into the generalised least squares criterion expression, from which estimates for the fixed effects can then be obtained. Hypothesis testing is also more complex in the mixed model as the F-statistic is not based anymore on the ratio of two mean squares due to the fixed effects factor and the error, because now there axe different sources of randomness.
We revisit Example 1.2.4, which is a design with two sources of randomness, that for herd for comparing drugs and that for animal within herd for comparing doses. Thus, there is a random effect and an error term. Assume, for instance, that an investigator wants to compare the activities of the two drugs in reducing the degree of anaemia, i.e. increase PCV after treatment.
The total sum of squares of the observations
can be subdivided into different components, each component corresponding to a sum of squares due to a particular factor. For instance, the sum of squares due to drug is given by
Thus, the mean of each drug is subtracted from the overall mean and squared. The sum of squares is multiplied by the number of observations per drug which is 20.
In a similar way, the sum of squares due to herd within drug is
Mean squares for drug and herd (drug) (i.e. herd within drug) are then obtained by dividing their sums of squares by their corresponding degrees of freedom. Assume now that the fixed effects model is used, even though there are random effects. The herd is thus mistakenly specified as a fixed effect. Each factor must now be tested against the error term being the only random term in the model. This leads to an incorrect test for drug, as can be seen from the table of expected mean squares (Table 1.3.2.1). In the tables of expected mean squares,
ǿ(x) corresponds to the effect of the fixed effects factor x, σ is the component of variance among herds within drug and
σ2 that among animals within herd.
Table 1.3.2.1 Expected mean squares of fixed effects model of data set of Example 1.2.4
Assuming, however, that herd is a random effects factor, the expected mean squares can be recalculated and are shown in Table 1.3.2.2. The SAS program to obtain this table is shown in Appendix B.1.1.
Table 1.3.2.2 Expected mean squares of mixed model of data set of Example 1.2.4
It is clear that the only difference between the expected mean squares for drug and herd(drug) is the term for the fixed effect of the drug. Thus, if there is no difference between the two drugs (null hypothesis), the two expected mean squares are equal. It can be shown that under this null hypothesis the ratio of these two terms, MS (drug) /MS (herd (drug)), follows an F-distribution with numerator degrees of freedom corresponding to the degrees of freedom of MS (drug) and denominator degrees of freedom corresponding to the degrees of freedom of MS (herd(drug)). Thus, by making appropriate ratios of mean squares, some hypotheses can be tested in this framework. Other hypotheses, however, cannot be tested in this way, because two such mean squares, which are equal under the null hypothesis, cannot be found. Moreover, if the data set is unbalanced (missing values), even simple hypotheses cannot be tested anymore by this method. Assume, for instance, that the first animal in herd 1 treated with the low dose of Berenil (see Table 1.2.4) was missing. By deleting this observation, the data set is no longer balanced. The expected mean squares for the new data set are shown in Table 1.3.2.3.
Table 1.3.2.3 Expected mean squares of the data set of Example 1.2.4 with one observation deleted
In this case, the expected mean squares of MS(drug) and MS(herd) are no longer the same under the null hypothesis, so the ratio of the two mean squares only approximately follows an F-distribution. As the imbalance in a data set increases, the more inappropriate is the use of this method for hypothesis testing.
The results of a statistical analysis are often presented in the form of means of the different treatment combinations, together with their standard errors and/or confidence intervals. When wrongly using the fixed effects model to analyse data in which more than one source of random variation occurs, the calculated standard errors of the means do not take into account the different sources of variation, since all the independent variables but one, the error term, are assumed to be fixed. Thus, standard errors calculated in the fixed effects model are only valid for the specific levels of the independent variables used in the experiment, even if some of these are random effects factors. Within the framework of the mixed model, the appropriate standard errors can be derived, depending on the goal of the investigator, since the different sources of variation can be included in the derivation of the standard error. As will be made clear by example, the fixed effects model always derives a standard error which includes only the variance of the random error term. The fixed effects model thus uses the narrow inference space of the experiment, as the inference is only valid for the particular levels of the variables in the experiments. The mixed model, however, allows one to derive a standard error in the narrow or broad inference space, and depending on the design, sometimes at intermediate levels between the broad and the narrow inference space. In the broad inference space the variability of all the random effects factors is taken into consideration, so that standard errors are valid for the population rather than for the specific levels of factors observed in the experiment.
Assume that a standard error must be determined for the mean response of a high dosage of Berenil based on the data of Example 1.2.4. In most circumstances, the desired inference space would be the broad inference space, so that the variability due to herds will be included in the standard error. An estimate of the mean can be obtained by summing all the responses of the animals to which the high dose of Berenil has been given:
The variance is obtained as
Thus, the two variance components are used in the derivation of the variance. The variability between herds is given by
σ and the variability between animals within a herd by
σ2.
In contrast, the variance for the mean response in the fixed effects model only contains the variance σ2. The mean is estimated by the same formula, but it is now assumed that hij is a fixed effect. Therefore, the variance of the mean is given by
The variance obtained in the fixed effects model is called the variance in the narrow inference space, because it is only valid for the particular herds in the experiment. The variance obtained in the mixed model is called the variance in the broad inference space, as it takes into account the herd to herd variability. Variances based on the narrow inference space can be obtained in the mixed model by calculating variances for the particular herds in the study.
In some cases, the investigator is also interested in 'predicting' individual random effects (the term prediction is used for random effects instead of estimation). One example is given by Example 1.2.7. On the one hand, it is important to obtain estimates of the among sire variation to compare it to the within sire variance. This is used to give an indication of the inheritance of a trait, such as resistance against helminthiasis. In general, if the within sire variance is small compared with the among sire variance, the trait is heritable and it might be possible to set up a breeding program to select for the trait. In such breeding programs, however, it is necessary to predict random effects for individual sires in order to decide which sires to be used in the breeding program.
In predicting a random sire effect, two sources of information must be taken into consideration. The first comes from the measurements of the offspring of the sire. The second is the distribution of the random sire effects. It is assumed that the random sire effect comes from a normal distribution for which the variance, σ2s, can be estimated. The combination of these two sources of information leads to the best linear unbiased predictor (Searle et al., 1992).
Assume we wish to predict the effect of sire i of the data set presented in Example 1.2.7. The best linear unbiased predictor of the ith random sire effect si is given by
where
In this expression, is the generalised least squares estimator (Section 2.5.1) and the estimators
and
are obtained by restricted maximum likelihood estimation (Section 2.4.2). The effect of both sources of information can easily be seen from this formula. If the estimate of the among sire variance
is large compared with the estimate of the within sire variance,
, the predictor will be approximately equal to
, and the information from the observations will mainly determine the prediction. If, on the other hand,
is much larger than
the predictor will tend to zero. Thus in that case, the predicted mean for each animal will be almost the same, the specific sire random effect being close to 0. Finally the larger n1, the greater will be the effect of information on the observations on the prediction.
As the mixed model methodology is heavily based on matrix notation, it is important that a clear notation is used in the development of the theory. Readers less familiar with matrix theory can, at this stage, read Appendix C. There we have put together in an easy-to-read way a description of the matrix algebra needed to understand mixed models. For the further reading of Chapter 2 we assume familiarity with the material in Appendix C.
A matrix or a vector is always put in bold.
For instance Y is the vector of observations, whereas Y presents just one observation.
The transpose of a matrix X or a vector Y is denoted by XT and YT, respectively.
The inverse of a matrix X is denoted by X-1.
The generalised inverse of a matrix X is denoted by X-.
The generalised inverse of the matrix XTX is denoted by G.
A mixed model contains both fixed effects and random effects. Greek letters are used to denote fixed effects, whereas Latin letters are used to denote random effects, including the random error.
The variance-covariance matrix or dispersion matrix of a vector of random variables T is denoted by D(T).
When T is the vector of observations Y, V is sometimes used as shorthand notation for D(Y).