Influence.RdReturns a matrix containing the influence function of a fitted model, e.g., a "vglm" object.
Influence(object, ...)
Influence.vglm(object, weighted = TRUE, ...)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.
An n by p.vlm matrix.
Influence functions are useful in fields such as sample survey theory, e.g., survey, svyVGAM. For each \(i=1,\ldots,n\), the formula is approximately \(-I U\) where \(I\) is the weighted Fisher information matrix and U is the \(i\)th score vector.
This function is currently experimental and
defaults may change.
Use with caution!
The functions here should not be confused with
lm.influence.
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
#> (Intercept):1 (Intercept):2 let:1 let:2
#> -8.9360297 -3.0390622 2.1653729 0.9020936
Influence(fit) # 8 x 4
#> (Intercept):1 (Intercept):2 let:1 let:2
#> 1 -0.73827808 0.35415869 0.20987191 -0.100483419
#> 2 -0.20653006 -0.08847618 0.05691954 0.024135324
#> 3 0.68701036 -0.53528307 -0.17723146 0.138551572
#> 4 -0.14332598 0.72736516 0.03367589 -0.182188428
#> 5 -0.01184705 -0.07833113 0.01542707 0.006407492
#> 6 0.19287499 0.13332817 -0.06828049 -0.045333144
#> 7 0.05572438 -0.15655193 -0.01821525 0.049445161
#> 8 0.16437144 -0.35620972 -0.05216720 0.109465443
all(abs(colSums(Influence(fit))) < 1e-6) # TRUE
#> [1] TRUE