Defines the random model in a hierarchical generalized linear model for the dispersion in a double hierarchical generalized linear model (R.W. Payne, Y. Lee, J.A. Nelder & M. Noh).
Options
DISTRIBUTION = string token |
Distribution for the random model (beta , normal , gamma , inversegamma ); default norm |
---|---|
LINK = string token |
Link for the random model (identity , logarithm , logit , reciprocal ); default iden |
RANDOMTERM = formula |
Random term whose dispersion is being modelled; if unset, the model is assumed to be for the residual dispersion parameter (phi) |
PHIMETHOD = string token |
Whether to fix or estimate the residual dispersion parameter in the dispersion HGLM (fix , estimate ); default fix |
Parameters
TERMS = formula |
Random model |
---|---|
DLINK = string tokens |
Link for the dispersion model for each random term (logarithm , reciprocal ); default loga |
DFORMULA = formula structures |
Dispersion model for each random term; default * i.e. none |
DOFFSET = variates |
Offset variate for 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 |
DDISPERSION = scalar |
Dispersion parameter to use in the dispersion model for each random term; default 1 |
FDISPERSION = scalar |
Fixed value for the dispersion parameter of each random term; default !s(*) i.e. dispersion is estimated |
Description
HGDRANDOMMODEL
lets you extend a hierarchical generalized linear model (HGLM) to become a double hierarchical generalized linear model (DHGLM); see Lee & Nelder (1996, 2001a, 2006) or Lee, Nelder & Pawitan (2006). This is done by adding some random terms to one of the generalized linear models that is to model the dispersion, so that this becomes an HGLM. By default the residual dispersion of this HGLM is fixed, but you can set option PHIMETHOD=estimate
to estimate it. The random term whose dispersion is to be modelled by the HGLM is indicated by the RANDOMTERM
option. If RANDOMTERM
is omitted, the dispersion model is assumed to be for the residual dispersion parameter (phi) of the original HGLM.
The TERMS
parameter defines the additional random terms, and the LINK
and DISTRIBUTION
options specify their distribution and link function respectively. You can specify a generalized linear model (GLM) to model the dispersion parameter for any of these additional random terms by specifying a Genstat formula structure, containing the (fixed) terms to be fitted in the GLM, using the DFORMULA
parameter (which runs in parallel with the list of random terms supplied by the TERMS
parameter). The DLINK
parameter specifies the link to use with each dispersion model, the DOFFSET
parameter allows you to specify an offset variate, and the DDISPERSION
parameter defines the dispersion parameter for the dispersion GLM (default 1). Alternatively, if you do not define a dispersion model for a random term, you can use the FDISPERSION
parameter to fix its dispersion at a specific value.
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
, RANDOMTERM
, PHIMETHOD
.
Parameters: TERMS
, DLINK
, DFORMULA
, DOFFSET
, LMATRIX
, DDISPERSION
, FDISPERSION
.
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, 139-185.
Lee, Y., Nelder, J.A. & Pawitan, Y. (2006). Generalized Linear Models with Random Effects: Unified Analysis via H-likelihood. Chapman and Hall, Boca Raton.
See also
Procedures: HGANALYSE
, HGDISPLAY
, HGFIXEDMODEL
, HGFTEST
, HGGRAPH
, HGKEEP
, HGNONLINEAR
, HGPLOT
, HGPREDICT
, HGRANDOMMODEL
, HGRTEST
, HGSTATUS
, HGWALD
.
Commands for: Regression analysis.
Example
CAPTION 'HGDRANDOMMODEL example','Crack-growth data (Hudak et al. 1978)';\ STYLE=meta, plain FACTOR [NVALUES=241; LEVELS=21] g READ g 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5 5 5 6 6 6 6 6 6 6 6 6 6 6 7 7 7 7 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 9 9 9 10 10 10 10 10 10 10 10 10 10 10 10 11 11 11 11 11 11 11 11 11 11 11 11 12 12 12 12 12 12 12 12 12 12 12 12 13 13 13 13 13 13 13 13 13 13 13 13 14 14 14 14 14 14 14 14 14 14 14 14 15 15 15 15 15 15 15 15 15 15 15 15 16 16 16 16 16 16 16 16 16 16 16 16 17 17 17 17 17 17 17 17 17 17 17 17 18 18 18 18 18 18 18 18 18 18 18 18 19 19 19 19 19 19 19 19 19 19 19 19 20 20 20 20 20 20 20 20 20 20 20 20 21 21 21 21 21 21 21 21 21 21 21 21 : VARIATE [NVALUES=241] t READ t 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 : VARIATE [NVALUES=241] y READ y 0.05 0.05 0.05 0.07 0.07 0.08 0.08 0.13 0.16 0.04 0.04 0.05 0.05 0.06 0.07 0.07 0.09 0.1 0.13 0.04 0.04 0.05 0.05 0.05 0.06 0.07 0.09 0.11 0.12 0.19 0.04 0.04 0.05 0.04 0.05 0.07 0.06 0.09 0.09 0.12 0.18 0.04 0.04 0.05 0.04 0.05 0.07 0.05 0.1 0.09 0.12 0.16 0.04 0.04 0.05 0.04 0.05 0.06 0.05 0.1 0.08 0.1 0.17 0.04 0.04 0.04 0.05 0.04 0.06 0.06 0.09 0.09 0.11 0.14 0.03 0.04 0.03 0.06 0.05 0.06 0.06 0.07 0.09 0.1 0.13 0.02 0.05 0.04 0.04 0.04 0.06 0.06 0.07 0.08 0.08 0.11 0.17 0.02 0.04 0.04 0.04 0.04 0.05 0.06 0.07 0.08 0.08 0.1 0.15 0.03 0.03 0.04 0.04 0.04 0.05 0.05 0.06 0.07 0.08 0.1 0.16 0.03 0.04 0.03 0.03 0.04 0.03 0.06 0.06 0.07 0.08 0.11 0.16 0.02 0.05 0.02 0.04 0.03 0.04 0.04 0.06 0.06 0.05 0.09 0.12 0.03 0.03 0.04 0.03 0.04 0.05 0.04 0.04 0.06 0.04 0.07 0.08 0.02 0.04 0.03 0.04 0.03 0.04 0.06 0.05 0.06 0.06 0.07 0.09 0.02 0.03 0.02 0.03 0.03 0.04 0.04 0.05 0.06 0.04 0.07 0.07 0.03 0.03 0.01 0.03 0.05 0.03 0.03 0.05 0.04 0.04 0.08 0.06 0.02 0.02 0.03 0.04 0.03 0.03 0.02 0.05 0.05 0.04 0.05 0.07 0.02 0.02 0.03 0.02 0.03 0.03 0.03 0.04 0.04 0.04 0.05 0.06 0.02 0.02 0.03 0.02 0.03 0.03 0.03 0.04 0.04 0.03 0.05 0.05 0.02 0.02 0.03 0.02 0.03 0.02 0.03 0.04 0.03 0.04 0.04 0.05 : VARIATE [NVALUES=241] y0 READ y0 0.9 0.95 1 1.05 1.12 1.19 1.27 1.35 1.48 0.9 0.94 0.98 1.03 1.08 1.14 1.21 1.28 1.37 1.47 0.9 0.94 0.98 1.03 1.08 1.13 1.19 1.26 1.35 1.46 1.58 0.9 0.94 0.98 1.03 1.07 1.12 1.19 1.25 1.34 1.43 1.55 0.9 0.94 0.98 1.03 1.07 1.12 1.19 1.24 1.34 1.43 1.55 0.9 0.94 0.98 1.03 1.07 1.12 1.18 1.23 1.33 1.41 1.51 0.9 0.94 0.98 1.02 1.07 1.11 1.17 1.23 1.32 1.41 1.52 0.9 0.93 0.97 1 1.06 1.11 1.17 1.23 1.3 1.39 1.49 0.9 0.92 0.97 1.01 1.05 1.09 1.15 1.21 1.28 1.36 1.44 1.55 0.9 0.92 0.96 1 1.04 1.08 1.13 1.19 1.26 1.34 1.42 1.52 0.9 0.93 0.96 1 1.04 1.08 1.13 1.18 1.24 1.31 1.39 1.49 0.9 0.93 0.97 1 1.03 1.07 1.1 1.16 1.22 1.29 1.37 1.48 0.9 0.92 0.97 0.99 1.03 1.06 1.1 1.14 1.2 1.26 1.31 1.4 0.9 0.93 0.96 1 1.03 1.07 1.12 1.16 1.2 1.26 1.3 1.37 0.9 0.92 0.96 0.99 1.03 1.06 1.1 1.16 1.21 1.27 1.33 1.4 0.9 0.92 0.95 0.97 1 1.03 1.07 1.11 1.16 1.22 1.26 1.33 0.9 0.93 0.96 0.97 1 1.05 1.08 1.11 1.16 1.2 1.24 1.32 0.9 0.92 0.94 0.97 1.01 1.04 1.07 1.09 1.14 1.19 1.23 1.28 0.9 0.92 0.94 0.97 0.99 1.02 1.05 1.08 1.12 1.16 1.2 1.25 0.9 0.92 0.94 0.97 0.99 1.02 1.05 1.08 1.12 1.16 1.19 1.24 0.9 0.92 0.94 0.97 0.99 1.02 1.04 1.07 1.11 1.14 1.18 1.22 : HGRANDOMMODEL [DISTRIBUTION=inversegamma; LINK=log] g HGFIXEDMODEL [DISTRIBUTION=gamma; LINK=log; DTERMS=t] y0 HGDRANDOMMODEL [DISTRIBUTION=normal; LINK=identity] g HGANALYSE y