HGPLOT procedure

Produces model-checking plots for 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 for which plots are required (mean, dispersion); default mean

RANDOMTERM = formula
Random term whose residuals are to be plotted; default * i.e. the residuals from the full model

DHGRANDOMTERM = formula
Random model term in a DHGLM whose residuals are to be plotted; default *

RMETHOD = string
Type of residual to use (deviance, Pearson, simple); default devi

INDEX = variate or factor
X-values to use for an index plot; default !(1,2...)

GRAPHICS = string
What type of graphics to use (lineprinter, highresolution); default high

TITLE = text
Overall title for the plots; if unset, the identifier of the y-variate is used

SAVE = pointer
Specifies the analysis (by HGANALYSE) from which the residuals and fitted values are to be taken; by default they are taken from the most recent analysis


Parameters

METHOD = strings
Types of graph (up to four out of the six possible) to be plotted (histogram, fittedvalues, absresidual, normal, halfnormal, index); default hist, fitt, norm, absr

PEN = scalars, variates or factors
Pen(s) to use for each plot


Description

HGPLOT 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. HGPLOT displays plots of residuals to help with model checking.

   Six types of plot are available. They are selected using the METHOD parameter

with settings:

    histogram
histogram of residuals;

    fittedvalues
residuals versus fitted values;

    absresidual
absolute values of residuals versus fitted values;

    normal
Normal plot;

    halfnormal
half-Normal plot; and

    index
plot against an "index" variable (specified by the INDEX option).

Up to four can be examined in any call of the procedure. The PEN parameter can be used to specify the graphics pen or pens to use for each plot. The TITLE option can supply an overall title. If this is not set, the identifier of the y-variate is used.

   The MODELTYPE option indicates the type of model for which the plots are required. The default setting mean requests plots from the mean model, and the alternative setting dispersion obtains plots from the dispersion model. The RANDOMTERM option specifies the random term whose residuals are to be plotted; if this is omitted the plot is for the residual term (phi). If a DHGLM has been fitted, you can plot residuals from the HGLM that is being used as a dispersion model by setting the DHGRANDOMTERM parameter to the random term concerned. The type of residual to plot is specified by the RMETHOD option; by default these are deviance residuals.

   By default, high-resolution graphics are used. Line-printer graphics can be used by setting option GRAPHICS=lineprinter.

 

Options: MODELTYPE, RANDOMTERM, DHGRANDOMTERM, RMETHOD, INDEX, GRAPHICS, TITLE, SAVE.

Parameters: METHOD, PEN.


Method

HGPLOT calls procedure DRESIDUALS to do the plotting.


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.