Purpose
Indicates that the generalized hat matrix diagonals be computed for each record whenever a model is fit. The NOHAT command is used to remove the %HAT variable and end the automatic computation of hat matrix diagonals.
Programs
AMFIT, GMBO
Syntax
HAT
NOHAT
Remarks
The HAT command defines a variable
called %HAT which is used to store the generalized hat
matrix diagonal for each record. The values of this variable are recomputed
after each model is fit. For AMFIT and GMBO the generalized hat matrix diagonals
describe the influence of each observation on the fitted value for that
observation. A large value of a hat matrix diagonal indicates that the
corresponding data point has a large influence on the fit. The sum of the hat
matrix diagonals is equal to the number of parameters (p) in the model.
As a rough guide, points with generalized hat matrix diagonals in excess of
(where
is the number of records in the
data set) might be considered to be points with a large influence on the fit.
Hat matrix diagonals are also used in the computation of other generalized
regression diagnostics. Cook and Weisberg (1982) and Belseley et al
(1980) discuss the use of hat matrix diagonals in the context of linear
regression. Pregiborn (1981) developed generalized regression diagnostics,
including hat matrix diagonals, for logistic regression and other generalized
linear models.
In AMFIT and GMBO the hat matrix diagonals for the
record is computed as:

where
is the contribution of
observation
to the score (partial derivative
of the log-likelihood with
respect to the parameters), and
is the information matrix
evaluated at the maximum likelihood estimate.
The hat matrix diagonals computed by AMFIT and GMBO are correct only for fully parametric, that is, unstratified, models.