gvif.lm | R Documentation |
Computes the generalized variance inflation factor (GVIF) for a weighted or unweighted normal linear model.
## S3 method for class 'lm'
gvif(model, verbose = TRUE, ...)
model |
an object of the class lm. |
verbose |
an (optional) logical switch indicating if should the report of results be printed. As default, |
... |
further arguments passed to or from other methods. |
If the number of degrees of freedom is 1 then the GVIF reduces to the Variance Inflation Factor (VIF).
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} , |
Fox J., Monette G. (1992) Generalized collinearity diagnostics, JASA 87, 178–183.
gvif.glm
###### 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.