## 1. Introduction

Our framework has two components. The first is the extended class of models, based on generalized linear models (GLMs) but allowing in addition the joint modelling of the mean and dispersion, and the introduction of random effects in their linear predictors. The second is the use of hierarchical (or *h*-)likelihood for making inferences from these models. The resulting algorithm is numerically efficient while giving statistically valid inferences.

Hierarchical generalized linear models (HGLMs) (Lee and Nelder, 1996) were originally developed from an initial synthesis of GLMs, random-effect models and structured dispersion models (Lee and Nelder, 2001a) and extended to include models for temporal and spatial correlations (Lee and Nelder, 2001b). Further extensions can be made by allowing random effects in various components in HGLMs. In this paper we investigate models with random effects in the dispersion model, which gives heavy-tailed models, allowing robust inference against outliers. Abrupt changes among repeated measures arising from the same subject can also be modelled by introducing random effects in the dispersion. We shall show how assumptions about skewness and kurtosis can be altered by using random effects. Many models can be unified and extended by the use of double hierarchical generalized linear models (DHGLMs); these include mixed linear models (Verbeke and Molenberghs, 2000), generalized linear mixed models (GLMMs) (Breslow and Clayton, 1993), HGLMs (Lee and Nelder, 1996), multilevel models (Goldstein, 1995), random-coefficient models (Longford, 1993), joint models of mean and dispersions (Nelder and Lee, 1991), splines (Wahba, 1990), semiparametric models (Zeger and Diggle, 1994), growth curve models (Zimmerman and Nunez-Anton, 2001), frailty models (Hougaard, 2000), heavy-tailed models (Lange *et al*., 1989), autoregressive conditional heteroscedasticity (ARCH) models (Engel, 1995), generalized ARCH (GARCH) and stochastic volatility (SV) models (Harvey *et al.*, 1994) in finance data, etc.

In the synthesis of the inferential tools that are needed for these broad classes of model, the *h*-likelihood (Lee and Nelder, 1996) plays a key role and gives a statistically (Section 4.1) and numerically efficient algorithm (Section 5). This algorithm can be used throughout the extended class of models and requires neither prior distributions of parameters nor quadrature for integration. DHGLMs can be decomposed into a set of interlinked GLMs. Thus, a great variety of models can be generated, fitted and compared by using the GLM iterative weighted least squares (IWLS) procedures. We can change the link function, allow various types of term in the linear predictor and use model selection methods for adding or deleting terms, not only for infer-ences about the mean and dispersion but also about the platykurtosis etc. Furthermore various model assumptions can be checked by applying GLM model checking procedures to the component GLMs. Further extensions of the class will be discussed.