Learn R Programming

mctest (version 1.0)

imcdiag: Individual multicollinearity diagnostics

Description

Computes different measures of multicollinearity diagnostics for each regression in the design matrix X. Individual measures includes variance Inflation factor (VIF), Farrar F-test for determination of multicollinearity, Auxiliary F-test for relationship of F and R-square, Leamer's method, Corrected VIF (CVIF), and Klein's rule.

Usage

imcdiag(x, y, method = NULL, na.rm = TRUE, corr = FALSE, vif=10, tol=0.1, conf=0.95, cvif=10, leamer=0.1,...)

Arguments

x
a numeric design matrix and should contain more than one regressor
y
a numeric vector of response variable
na.rm
whether to remove missing observations
method
specific individual measure of collinearity such as VIF, CVIF, and Leamer, etc. For example, method="VIF"
corr
whether to display correlation matrix or not Inter=TRUE
vif
defualt threshold for VIF measure, vif=10
tol
default thereshold for TOL measure, tol=0.10
conf
default confidence level for Farrar's Wi test, conf=0.99
cvif
default threshold for CVIF measure, CVIF=10
leamer
default threshold for Leamer's method, leamer=0.1
...
extra argument(s) if used will be ignored

Value

Returns the diagnostic measures value with decision of either multicollinearity is detected by the diagnostic measure or not. Value of 1 indicate multicollineairty is detected and 0 indicate measure could not detect the existance of multicollinearity. An output list object of class imc:
idiags
listing of specific individual measure such as method="CVIF" provided. If method is not used all individual diagnostics will be dispalyed.
x
matrix of regressors.
y
a vector of response variable.
method
individual collinearity measure.
corr
logical, if FALSE (the default value) a correlation matrix is returned after all or required individual collinearity diagnostic.

Details

The imcdiag function detectes the existance of multicollinearity due to x-variable. That's why named as individual measures of diagnostics. This includes VIF, TOL, Condition Indices, Klien's rule, Theil's measure, Red Indicator, Farrar and Glauber test of Chi-square and F-test, Leamer's method etc. If method argument is used (method="VIF"), the result for VIF indicator will be displayed with decision of either collinearity exists or not due to certain regressor which is indicated by 0 (collinearity is not detected by method for regressor given in row) and 1 (collinearity is detected by the method for regressor given in row).

References

Belsely, D.A., A Guide to Using the Collinearity Diagnostics. Computer science in Economics and Management, 1991. 4(1): 33--50.

Catterjee, S. and A. Hadi, Regression Analysis by Example. 4 ed. 2006, Hoboken, New York; John Willey and Sons Inc.

Belsley, David. A., Edwin. Kuh, and Roy. E. Welsch. 1980. Regression Diagnostics: Identifying Influential Data and Sources of Collinearity. New York: John Wiley and Sons.

Greene, William H. 2000. Econometric Analysis. 4th Ed. Upper Saddle River, NJ: Prentice--Hall.

See Also

omcdiag

Examples

Run this code
## Hald Cement data
data(Hald)
x<-Hald[,-1]
y<-Hald[,1]

## all Individual measures
id<-imcdiag(x,y); id$idiags[,1]

# VIF measure with custom VIF threshold
imcdiag(x,y, method="VIF", vif=5)

# CVIF measure with custom CVIF threshold and correlation matrix
imcdiag(x,y, method="CVIF", cvif=5, corr=TRUE)

## only VIF values without collinearity detection indication
imcdiag(x,y, method="VIF")[[1]][,1]
plot(imcdiag(x,y, method="VIF")[[1]][,1]) # vif plot

Run the code above in your browser using DataLab