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, ...)
vglm
.type = "matrix"
then the entire hat matrix is
returned.
If type = "centralBlocks"
then $n$ central
$M \times M$ block matrices,par
etc.
The default of ylim
is c(0, max(hatvalues(model)))
which means that if the horizontal dashed lines cannot be seen
then there are no pmaxit.new = 1
will give a one IRLS step approximation
from the ordinary solution (and no warnings!).
Else having maxit.new = 10
, say, should usually mean
convergence will occur for all observations when they are
rehatplot.vlm()
.hatvalues(vglmObject)
should return a
$n \times 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.
vglm
,
cumulative
,
influence.measures
.# 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
par(mfrow = c(1, 2))
hatplot(fit, ylim = c(0, 1), las = 1, col = "blue")
Run the code above in your browser using DataLab