vif | R Documentation |
vif
calculates variance-inflation and generalized variance-inflation factors for linear, generalized linear to identify collinearity among explanatory variables.
vif(model, merge_coef = FALSE)
model |
A model object. |
merge_coef |
Logical, whether to merge with coefficients of model summary matrix. Defaults to FALSE. |
A data frame with columns for variable and gvif, or additional columns for df and gvif^(1/(2*df)) if provided model uses factor variable.
https://cran.r-project.org/package=car
data(germancredit)
# Example I
fit1 = glm(creditability~ age.in.years + credit.amount +
present.residence.since, family = binomial(), data = germancredit)
vif(fit1)
vif(fit1, merge_coef=TRUE)
# Example II
fit2 = glm(creditability~ status.of.existing.checking.account +
credit.history + credit.amount, family = binomial(), data = germancredit)
vif(fit2)
vif(fit2, merge_coef=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.