Learn R Programming

glmtoolbox (version 0.1.12)

gvif.lm: Generalized Variance Inflation Factor

Description

Computes the generalized variance inflation factor (GVIF) for a weighted or unweighted normal linear model.

Usage

# S3 method for lm
gvif(model, verbose = TRUE, ...)

Value

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

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

Arguments

model

an object of the class lm.

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).

References

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

See Also

gvif.glm

Examples

Run this code
###### Example 1: New York air quality measurements
fit1 <- lm(log(Ozone) ~ Solar.R + Temp + Wind, data=airquality)
gvif(fit1)

###### Example 2: Fuel consumption of automobiles
fit2 <- lm(mpg ~ log(hp) + log(wt) + qsec, data=mtcars)
gvif(fit2)

###### Example 3: Credit card balance
Credit <- ISLR::Credit
fit3 <- lm(Balance ~ Cards + Age + Rating + Income + Student + Limit, data=Credit)
gvif(fit3)

Run the code above in your browser using DataLab