Learn R Programming

mctest (version 1.0)

mc.plot: Plot of VIF and Eigen values

Description

Plot of VIF and Eigen values for detection of multicollinearity among regressors. The VIF and Eigen values are also displayed on graph. Eigen values plot can be displayed with or without inclusion of intercept term.

Usage

mc.plot(x,y, Inter=FALSE, vif=10, ev=0.01, ...)

Arguments

x
a numeric design matrix and should contain more than one regressor
y
a numeric vector of response variable
Inter
whether to include or exclude Intercept term
vif
threshold of VIF and will appear as horizontal line on VIF plot. The default value is vif=10.
ev
threshold of Eigenvalues and will appear as horizontal line on Eigvenvalues plot. The default value is ev=0.01.
...
extra argument(s) if used will be ignored

Value

Details

mc.plot function draw graphs of VIF and Eigenvalues for graphical detection of collinearity among regression. Horizontal line for VIF and Eigenvalues is drawn as indication of multicollinearity existence.

References

Imdadullah, M. Addressing Linear Regression Models with Correlated Regressors: Some Package Development in R, Unpublished Ph.D thesis, Department of Statistics, Bahauddin Zakriya University, Multan, Pakistan.

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, imcdiag

Examples

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

## plot with default threshold of VIF and Eigenvalues with no intercept
mc.plot(x, y)

## plot with default threshold of VIF and Eigenvalues with intercept
mc.plot(x, y, Inter=TRUE)

## plot with specific threshold of VIF and Eigenvalues with no intercept
mc.plot(x, y, vif=5, ev=20)

## plot with specific threshold of VIF and Eigenvalues with intercept
mc.plot(x, y, vif=5, ev=20, Inter=TRUE)

Run the code above in your browser using DataLab