gvif.glm: Generalized Variance Inflaction Factor

Description Usage Arguments Value References See Also Examples

View source: R/glms.R

Description

Computes the generalized variance inflaction factor (GVIF) for a generalized linear model.

Usage

1
2
## S3 method for class 'glm'
gvif(model, verbose = TRUE, ...)

Arguments

model

an object of the class glm which is obtained from the fit of a generalized linear model.

verbose

an (optional) logical switch indicating if should the report of results be printed. By default, verbose is set to be TRUE.

...

further arguments passed to or from other methods.

Value

A matrix with so many rows as effects in the model and three columns: (1) the values of GVIF; (2) the number of degrees of freedom; and (3) the values of GVIF^1/(2*df).

If the number of degrees of freedom is 1 then the GVIF reduces to the Variance Inflation Factor (VIF).

References

Fox J. and Monette G. (1992) Generalized collinearity diagnostics, JASA 87, 178–183.

See Also

gvif.lm

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Example 1
Auto <- ISLR::Auto
fit1 <- glm(mpg ~ weight*horsepower, family=inverse.gaussian("log"), data=Auto)
gvif(fit1)

## Example 2
burn1000 <- aplore3::burn1000
mod <- death ~ age + tbsa + inh_inj + age*inh_inj + tbsa*inh_inj
fit2 <- glm(mod, family=binomial("logit"), data=burn1000)
gvif(fit2)

## Example 3
fit3 <- glm(rtime ~ log(distance) + log(cclimb), family=Gamma("log"), data=races)
gvif(fit3)

glmtoolbox documentation built on June 9, 2021, 9:07 a.m.