HGKEEP procedure

Saves information from a hierarchical or double hierarchical generalized linear model analysis (R.W. Payne, Y. Lee, J.A. Nelder & M. Noh).


Options

MODELTYPE = string
Type of model from which to save information (mean, dispersion); default mean

RMETHOD = string
Type of residuals to save using the RESIDUALS parameter (deviance, Pearson, simple); default devi

SAVE = pointer
Save structure (from HGANALYSE) to provide details of the analysis; if omitted, information is saved from the most recent analysis


Parameters

RANDOMTERM = formula
Random model terms from whose analysis the information is to be saved

DHGRANDOMTERM = formula
Random model terms in a DHGLM from whose (HGLM) analysis the information is to be saved

RESIDUALS = variates
Residuals

FITTEDVALUES = variates
Fitted values

LEVERAGES = variates
Leverages

ESTIMATES = variates
Estimates of parameters

SE = variates
Standard errors of the estimates

VCOVARIANCE = symmetric matrices
Variance-covariance matrix of each set of estimates

DEVIANCE = scalars or tables
Scaled deviances (in a table) for a mean model, or residual deviance (in a scalar) for a dispersion model

DF = scalars or tables
Residual degrees of freedom

ITERATIVEWEIGHTS = variates
Iterative weights

LINEARPREDICTOR = variates
Linear predictors

YADJUSTED = variates
Adjusted responses

LIKELIHOODSTATISTICS = variates
Likelihood statistics


Description

HGKEEP is one of several procedures with the prefix HG, which provide tools for fitting the hierarchical and double hierarchical generalized linear models (HGLMs and DHGLMs) defined by Lee & Nelder (1996, 2001, 2006). The models are defined by the HGFIXEDMODEL, HGRANDOMMODEL and HGDRANDOMMODEL procedures, and fitted by the HGANALYSE procedure. HGKEEP allows you to copy information from the output into standard GenStat data structures.

   The MODELTYPE option indicates the model (mean or dispersion) from which the information is to be saved; by default this is the model for the mean (i.e. the main HGLM). The RANDOMTERM parameter specifies the random term from whose analysis the information is to be saved; if this is omitted the information is for the residual term (phi). If a DHGLM has been fitted, you can save information from the HGLM that is being used as a dispersion model by setting the DHGRANDOMTERM parameter to the random term concerned. The LIKELIHOODSTATISTICS parameter saves the likelihood statistics (as given by the likelihoodstatistics setting of the PRINT option of HGANALYSE and HGDISPLAY). The other parameters operate as in the RKEEP directive except that, for a mean model, DEVIANCE saves tables of scaled deviances and DF saves a table with the corresponding degrees of freedom. Similarly, as in the RKEEP directive, the RMETHOD option indicates the type of residual to form.

 

Options: MODELTYPE, RMETHOD, SAVE.

Parameters: RANDOMTERM, DHGRANDOMTERM, RESIDUALS, FITTEDVALUES, LEVERAGES, ESTIMATES, SE, VCOVARIANCE, DEVIANCE, DF, ITERATIVEWEIGHTS, LINEARPREDICTOR, YADJUSTED, LIKELIHOODSTATISTICS.


Method

HGKEEP mainly uses the RKEEP directive.


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. (2001). 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. (2006). Double hierarchical generalized linear models (with discussion). Appl. Statist., 55, 139-185.