gvif.glm: Generalized Variance Inflation Factor

View source: R/glms.R

gvif.glmR Documentation

Generalized Variance Inflation Factor

Description

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

Usage

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

Arguments

model

an object of the class glm.

verbose

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

...

further arguments passed to or from other methods.

Details

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

Value

A matrix with so many rows as effects in the model and the following columns:

GVIF the values of GVIF,
df the number of degrees of freedom,
GVIF^(1/(2*df)) the values of GVIF^{1/2 df},

References

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

See Also

gvif.lm

Examples

###### Example 1: Fuel consumption of automobiles
Auto <- ISLR::Auto
Auto2 <- within(Auto, origin <- factor(origin))
mod <- mpg ~ cylinders + displacement + acceleration + origin + horsepower*weight
fit1 <- glm(mod, family=inverse.gaussian("log"), data=Auto2)
gvif(fit1)

###### Example 2: Patients with burn injuries
burn1000 <- aplore3::burn1000
burn1000 <- within(burn1000, death <- factor(death, levels=c("Dead","Alive")))
mod2 <- death ~ gender + race + flame + age*inh_inj + tbsa*inh_inj
fit2 <- glm(mod2, family=binomial("logit"), data=burn1000)
gvif(fit2)

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


glmtoolbox documentation built on Sept. 11, 2024, 7:32 p.m.