13
School of Veterinary Medicine and Science REML and nested models

School of Veterinary Medicine and Science REML and nested models

Embed Size (px)

Citation preview

Page 1: School of Veterinary Medicine and Science REML and nested models

School of Veterinary Medicine and Science

REML and nested models

Page 2: School of Veterinary Medicine and Science REML and nested models

School of Veterinary Medicine and Science

First thing to say

• I’m definitely no expert.

• I have used linear mixed models in research on an as need basis – trouble is, nearly all the data i collect ends up being better analysed as a mixed-effects model.

• Dont be scared by them, for some datasets they give same answer as ANOVA

Page 3: School of Veterinary Medicine and Science REML and nested models

School of Veterinary Medicine and Science

So why not use ANOVA

• REML can handle missing data– ANOVA cannot easily, especially for

interactions

• REML can handle unbalanced data– Different treatment n, more males than

females, skewed etc...

• REML doesnt underestimate the residual error in unbalanced data– ANOVA does...

Page 4: School of Veterinary Medicine and Science REML and nested models

School of Veterinary Medicine and Science

The blurb…

• 5.1.3 REML estimation• The method of residual maximum likelihood (REML) was introduced by

Patterson &Thompson (1971). It was developed in order to avoid the biased variance component estimates that are produced by ordinary maximum likelihood estimation: because maximum likelihood estimates of variance components take no account of the degrees of freedom used in estimating treatment effects, they have a downwards bias which increases with the number of fixed effects in the model. This in turn leads to underestimates of standard errors for fixed effects, which may lead to incorrect inferences being drawn from the data. Estimates of variance parameters which take account of the degrees of freedom used in estimating fixed effects, like those generated by ANOVA in balanced data sets, are more desirable.

Page 5: School of Veterinary Medicine and Science REML and nested models

School of Veterinary Medicine and Science

Balanced vs unbalanced

Page 6: School of Veterinary Medicine and Science REML and nested models

School of Veterinary Medicine and Science

Why is REML better?

Page 7: School of Veterinary Medicine and Science REML and nested models

School of Veterinary Medicine and Science

• 5.1 Models for REML estimation• The fixed and random parts of the model are discussed 5.1.1,• before a formal description of the model is given in 5.1.2. • Section 5.1.3 then explains the theory behind the residual maximum

likelihood method.

• 5.1.1 Fixed and random effects• Fixed effects are used to describe treatments imposed in an

experiment where it is the effect of those specific choices of treatment that are of interest.

• Random effects are generally used to describe the effects of factors where the values present in the experiment represent a random selection of the values in some larger homogeneous population. It is then possible to make some inference about this population, for example to estimate its variance and to assess the contribution from a factor to the total variation in the data. Predictions of random effects may also be of interest.

•  

Page 8: School of Veterinary Medicine and Science REML and nested models

School of Veterinary Medicine and Science

• Example (from Dempster et al. 1984) involves an experiment to assess the effect of an experimental compound on maternal performance (see 5.3.3). Twenty seven female rats (dams) were treated with either a control substance or a high or low dose of an experimental compound in order to examine the effects on their litters.

• The experimental data were then the weights of each individual pup.

• The different treatments are specified as fixed effects. Since litter size and the sex of the pup influence weight, these factors must also be included, and as the effects of the specific values of these factors in the experiment are of interest, we define them as fixed effects. Further variation is introduced into the data from the effects of different dams.

• Since the dams could be considered as a random selection from a wider homogeneous population they are introduced to the model as a random effect. The effect of pups is clearly also a random effect. In fact, since the pups are the units of the experiment, the variation between pups is the error variance component (*units*).

•  

Page 9: School of Veterinary Medicine and Science REML and nested models

School of Veterinary Medicine and Science

• The choice of fixed and random terms is not always determined by the structure of the experiment, but may depend on the information required.

• For example, trials are often carried out over different sites and in several years. If a general assessment of varieties over time is required, then the years present in the trial are considered as a random selection of years, and year would be defined as a random term in the model. On the other hand, if the effect of the specific years present in the trial was to be assessed, year would be defined as a fixed term.

 • Similarly, the fixed model in the rat reproductive study described above might be

written as:

Fixed effects, Dose*Sex+Littersize Random effects Dam/Pup

Page 10: School of Veterinary Medicine and Science REML and nested models

School of Veterinary Medicine and Science

From wainwright papers

Page 11: School of Veterinary Medicine and Science REML and nested models

School of Veterinary Medicine and Science

Page 12: School of Veterinary Medicine and Science REML and nested models

School of Veterinary Medicine and Science

Page 13: School of Veterinary Medicine and Science REML and nested models

School of Veterinary Medicine and Science

• Now to try for yourself

• Open ‘Data for REML’ in your favourite stats program.