Hat Values and Regression Deletion Diagnostics
When complete, a suite of functions that can be used to compute some of the regression (leave-one-out deletion) diagnostics, for the VGLM class.
hatvalues(model, ...) hatvaluesvlm(model, type = c("diagonal", "matrix", "centralBlocks"), ...) hatplot(model, ...) hatplot.vlm(model, multiplier = c(2, 3), lty = "dashed", xlab = "Observation", ylab = "Hat values", ylim = NULL, ...) dfbetavlm(model, maxit.new = 1, trace.new = FALSE, smallno = 1.0e-8, ...)
model |
an R object, typically returned by |
type |
Character.
The default is the first choice, which is
a nM x nM matrix.
If |
multiplier |
Numeric, the multiplier. The usual rule-of-thumb is that values greater than two or three times the average leverage (at least for the linear model) should be checked. |
lty, xlab, ylab, ylim |
Graphical parameters, see
|
maxit.new, trace.new, smallno |
Having |
... |
further arguments,
for example, graphical parameters for |
The invocation hatvalues(vglmObject)
should return a
n x M matrix of the diagonal elements of the
hat (projection) matrix of a vglm
object.
To do this,
the QR decomposition of the object is retrieved or
reconstructed, and then straightforward calculations
are performed.
The invocation hatplot(vglmObject)
should plot
the diagonal of the hat matrix for each of the M
linear/additive predictors.
By default, two horizontal dashed lines are added;
hat values higher than these ought to be checked.
It is hoped, soon, that the full suite of functions described at
influence.measures
will be written for VGLMs.
This will enable general regression deletion diagnostics to be
available for the entire VGLM class.
T. W. Yee.
# Proportional odds model, p.179, in McCullagh and Nelder (1989) pneumo <- transform(pneumo, let = log(exposure.time)) fit <- vglm(cbind(normal, mild, severe) ~ let, cumulative, data = pneumo) hatvalues(fit) # n x M matrix, with positive values all.equal(sum(hatvalues(fit)), fit@rank) # Should be TRUE ## Not run: par(mfrow = c(1, 2)) hatplot(fit, ylim = c(0, 1), las = 1, col = "blue") ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.