Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

Influence

Influence Function (S4 generic) of a Fitted Model


Description

Returns a matrix containing the influence function of a fitted model, e.g., a "vglm" object.

Usage

Influence(object, ...)
Influence.vglm(object, weighted = TRUE, ...)

Arguments

object

an object, especially that of class "vglm"—see vglm-class. Currently other classes such as "vgam" are not yet implemented.

weighted

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.

Details

Influence functions are useful in fields such as sample survey theory, e.g., survey. For each i=1,...,n, the formula is approximately -I U where I is the weighted Fisher information matrix and U is the ith score vector.

Value

An n by p.vlm matrix.

Warning

This function is currently experimental and defaults may change. Use with caution! The functions here should not be confused with lm.influence.

See Also

vglm, vglm-class, survey.

Examples

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

VGAM

Vector Generalized Linear and Additive Models

v1.1-5
GPL-3
Authors
Thomas Yee [aut, cre], Cleve Moler [ctb] (author of several LINPACK routines)
Initial release
2021-01-13

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.