vif: Variance Inflation Factors

Description Usage Arguments Value See Also Examples

View source: R/vif.R

Description

vif calculates variance-inflation and generalized variance-inflation factors for linear, generalized linear.

Usage

1
vif(model, merge_coef = FALSE)

Arguments

model

A model object.

merge_coef

Logical, whether to merge with coefficients of model summary matrix. Defaults to FALSE.

Value

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.

See Also

https://cran.r-project.org/package=car

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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)

scorecard documentation built on Aug. 30, 2020, 5:06 p.m.