Returns a matrix containing the influence function of a fitted model, e.g., a "vglm" object.
Influence(object, ...)
Influence.vglm(object, weighted = TRUE, ...)
An n
by p.vlm
matrix.
an object, especially that of class "vglm"
---see
vglm-class
.
Currently other classes such as "vgam"
are not yet
implemented.
Logical. Include the prior weights?
Currently only TRUE
is accepted.
This might change in the future and/or
the default value might change.
any additional arguments such as to allow or disallow the prior weights.
This function is currently experimental and
defaults may change.
Use with caution!
The functions here should not be confused with
lm.influence
.
Influence functions are useful in fields such
as sample survey theory,
e.g.,
survey,
svyVGAM.
For each
vglm
,
vglm-class
,
survey.
pneumo <- transform(pneumo, let = log(exposure.time))
fit <- vglm(cbind(normal, mild, severe) ~ let, acat, data = pneumo)
coef(fit) # 8-vector
Influence(fit) # 8 x 4
all(abs(colSums(Influence(fit))) < 1e-6) # TRUE
Run the code above in your browser using DataLab