## The Bayesian approach

When the Bayesian approach is used, negative variance components estimates are usually avoided by choosing a prior distribution for the variance components that is restricted to have positive values only. However, we have found that this can sometimes cause peaks in the posterior distribution for the variance components close to zero. Therefore, use of an estimator such as the median or expected value for variance parameters will be preferable to using the mode.

### 2.4.2 Accuracy of variance parameters

It is important that variance parameters are estimated with a reasonable accuracy because of their effect on the calculation of fixed effects and their standard errors.

The accuracy of the variance parameters is dependent on the number of DF used to estimate them. Although there are no hard and fast rules, it would seem inadvisable to fit an effect as random if less than about five DF were available for estimation (e.g. a multi-centre trial with five or less centres).

When an insufficient number of DF are available to estimate a variance parameter accurately, an alternative to resorting to a fixed effects model would be to utilise variance parameter estimates from a similar previous study. An approach that is specifically allowed for in proc mixed is to fix the variance parameters in the new analysis at their previous values. The fixed effects, a = (X/V-1X)-1X/V-1y, are then calculated using a fixed V matrix. However, this has the weakness of not utilising information on the variance parameters contained in the current study. A more natural approach, using both the previous variance parameter estimates and information in the current study, would be to use an informative prior for the variance parameters in a Bayesian analysis. This can be achieved by using the previous posterior distribution ofthe variance parameters as the prior distribution in the current analysis.