VIF: Variance Inflation Factor

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/VIF.R

Description

The function returns the Variance Inflation Factors (VIFs) of the independent variables of the multiple linear regression model.

Usage

1
VIF(X, dummy = F, pos = NULL)

Arguments

X

A numeric design matrix that should contain more than one regressor (intercept included).

dummy

A logical value that indicates if there are dummy variables in the design matrix X. By default dummy=F.

pos

A numeric vector that indicates the position of the dummy variables, if these exist, in the design matrix X. By default pos=NULL.

Details

The function returns the VIFs from the main diagonal of the inverse of the matrix of correlations of the independent variables of the multiple linear regression. Due to the VIF is only calculated for the independent variables, it only allows to detect the essential collinearity. In addition, the VIF is not adequate for dummy variables since it is obtained from the matrix of simple correlations.

Value

Variance Inflation Factor of each independent variable excluded the intercept.

Note

Values of VIF that exceed 10 indicate near essential multicolinearity.

Author(s)

R. Salmer<f3>n (romansg@ugr.es) and C. Garc<ed>a (cbgarcia@ugr.es).

References

D. Marquardt and R. Snee (1975). Ridge regression in practice. The American Statistician, 1 (29), 3–20.

L. R. Klein and A.S. Goldberger (1964). An economic model of the United States, 1929-1952. North Holland Publishing Company, Amsterdan.

H. Theil (1971). Principles of Econometrics. John Wiley & Sons, New York.

See Also

RdetR, ki.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# Henri Theil's textile consumption data modified
data(theil)
head(theil)
cte = array(1,length(theil[,2]))
theil.X = cbind(cte,theil[,-(1:2)])
VIF(theil.X, TRUE, pos = 4)

# Klein and Goldberger data on consumption and wage income
data(KG)
head(KG)
cte = array(1,length(KG[,1]))
KG.X = cbind(cte,KG[,-1])
VIF(KG.X)

Example output

sh: 1: cannot create /dev/null: Permission denied
      obs consume income relprice twentys
[1,] 1923    99.2   96.7    101.0       1
[2,] 1924    99.0   98.1    100.1       1
[3,] 1925   100.0  100.0    100.0       1
[4,] 1926   111.6  104.9     90.6       1
[5,] 1927   122.2  104.9     86.5       1
[6,] 1928   117.6  109.5     89.7       1
  income relprice 
1.033043 1.033043 
  consumption wage.income non.farm.income farm.income
1        62.8       43.41           17.10        3.96
2        65.0       46.44           18.65        5.48
3        63.9       44.35           17.09        4.37
4        67.5       47.82           19.28        4.51
5        71.3       51.02           23.24        4.88
6        76.6       58.71           28.11        6.37
    wage.income non.farm.income     farm.income 
      12.296544        9.230073        2.976638 

multiColl documentation built on May 2, 2019, 4:53 p.m.