Estimation in mixed linear models is, in general, computationally demanding
, since applied problems may involve extensive data sets and large numbers
of random effects. Existing computer algorithms are slow and/or require lar
ge amounts of memory. These problems are compounded in generalized linear m
ixed models for categorical data, since even approximate methods involve fi
tting of a linear mixed model within steps of an iteratively reweighted lea
st squares algorithm. Only in models in which the random effects are hierar
chically nested can the computations for fitting these models to large data
sets be carried out rapidly. We describe a data augmentation approach to t
hese computational difficulties in which we repeatedly fit an overlapping s
eries of submodels, incorporating the missing terms in each submodel as 'of
fsets'. The submodels are chosen so that they have a nested random-effect s
tructure, thus allowing maximum exploitation of the computational efficienc
y which is available in this case. Examples of the use of the algorithm for
both metric and discrete responses are discussed, all calculations being c
arried out using macros within the MLwiN program.