HGRANDOMMODEL procedure

Defines the random model for a hierarchical or double hierarchical generalized linear model (R.W. Payne, Y. Lee, J.A. Nelder & M. Noh).


Options

DISTRIBUTION = string
Distribution for the random model (beta, normal, gamma, inversegamma); default norm

LINK = string
Link for the random model (identity, logarithm, logit, reciprocal); default iden


Parameters

TERMS = formula
Random model

DFORMULA = formulae
Dispersion model for each random term; default * i.e. none

LMATRIX = matrices
Linear transformation to apply to design matrix Z of each random term, in order to define correlations between its effects; default * i.e. none


Description

HGRANDOMMODEL is one of several procedures with the prefix HG, which provide tools for fitting the hierarchical generalized linear models defined by Lee & Nelder (1996, 2001a, 2006). These models extend generalized linear models (GLMs) to include additional random terms in the linear predictor. They include generalized linear mixed models (GLMMs) as a special case, but do not constrain the additional terms to follow a Normal distribution and to have an identity link (as in the GLMM). For example, if the basic generalized linear model is a log-linear model (Poisson distribution and log link), a more appropriate assumption or the additional random terms might be a gamma distribution and a log link.

   The TERMS parameter defines the additional random terms, and the LINK and DISTRIBUTION options specify their distribution and link function respectively. The HGLM methodology also caters for structured dispersion models, in which fixed terms are included in the generalized linear models that are used to estimate the dispersion parameters for the random terms of the HGLM. Currently these GLMs must have a gamma distribution and a logarithmic link. These fixed terms are specified in a GenStat formula structure using the DFORMULA parameter (which runs in parallel with the list of random terms supplied by the TERMS parameter). You can also extend a dispersion GLM to become an HGLM (thus making the full model a double hierarchical generalized linear model or DHGLM), by using the HGDRANDOMMODEL procedure to add some random terms.

   The LMATRIX parameter allows correlation structures to be defined for random terms, using the method described by Lee & Nelder (2001b). This is done by setting LMATRIX to a matrix L that is used as a post-multiplier for the Z matrix of the random term concerned. Lee & Nelder (2001b) give examples illustrating the types of model that can be defined.

 

Options: DISTRIBUTION, LINK.

Parameters: TERMS, DFORMULA, LMATRIX.


Method

The information is stored in a workspace G5PL_HG (accessed using the WORKSPACE directive) for later use by HGANALYSE.


References

Lee, Y., & Nelder, J.A. (1996). Hierarchical generalized linear models (with discussion). Journal of the Royal Statistical Society, Series B, 58, 619-678.

Lee, Y., & Nelder, J.A. (2001a). Hierarchical generalized linear models: a synthesis of generalised linear models, random-effect models and structured dispersions. Biometrika, 88, 987-1006.

Lee, Y. & Nelder, J.A. (2001b). Modelling and analysing correlated non-normal data. Statistical Modelling, 1, 3-16.

Lee, Y. & Nelder, J.A. (2006). Double hierarchical generalized linear models (with discussion). Appl. Statist., 55, 1-29.