Learn R Programming

mctest (version 1.0)

mctest: Multicollinearity diagnostic measures

Description

mctest display overall, individual or both types of multicollinearity diagnostic measures from omcdiag and imcdiag functions respectively.

Usage

mctest(x, y, type=c("o","i","b"), na.rm = TRUE, Inter=TRUE, method=NULL, corr=FALSE, detr=0.01, red=0.5, theil=0.5, cn=30, 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
Inter
whether to include or exclude Intercept term
type
displays overall, individual or both type of collinearity dignostics. Individual collinearity diagnostics are displayed by default.
method
specific individual measure of collinearity such as VIF, TOL, CVIF, adn Leamer, etc. For example, method="VIF"
corr
whether to display correlation matrix or not Inter=TRUE
detr
determinant default threshold
red
red indicator default threshold
theil
Theil indicator default threshold
cn
condition number default threshold
vif
defualt threshold for VIF measure, vif=10
conf
default confidence level for Farrar's test, conf=0.99
cvif
default threshold for CVIF measure, CVIF=10
tol
default threshold forTOL measure, TOL=0.10
leamer
default threshold for Leamer's method, leamer=0.1
...
extra argument(s) if used will be ignored

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]

## Overall diagnostic measures and eigenvalues with intercept term
mctest(x, y)

## Overall diagnostic measures and eigenvalues without intercept term
mctest(x, y, Inter=FALSE)

## all individual diagnostic measures
mctest(x, y, type="i")

## certain individual diagnostic measures with collinearity detection indication
VIF<-mctest(x, y, type="i", method="VIF")
VIF[[1]][,1] # named VIF values only

## all individual diagnostic measures with correlation matrix
mctest(x, y, type="i", corr=TRUE)

## VIF and correlation matrix with collinearity detection indication
mctest(x, y, type="i", method="VIF", corr=TRUE)

## both overall and individual collinearity diagnostics
mctest(x, y, type="b")
mctest(x, y, type="b", method="VIF", cor=TRUE)

## all overall and vif with correlation matrix
## VIF and CN desired threshold
## eigenvalues without intercept term
mctest(x, y, type="b", method="VIF", Inter=FALSE, vif=15, cn=35)

Run the code above in your browser using DataLab