mctest (version 1.3.1)

mctest: Multicollinearity diagnostic measures

Description

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

Usage

mctest(mod, 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, ind1=0.02, ind2=0.7, leamer=0.1, all=FALSE, ...)

Arguments

mod

A model object, not necessarily type lm

na.rm

Whether to remove missing observations.

Inter

Whether to include or exclude Intercept term. By default Inter=TRUE.

type

Displays overall, individual or both type of collinearity diagnostics. Overall collinearity diagnostics are displayed by default with eigenvalues and condition indexes, when method and type argument are not used.

method

Specific individual measure of collinearity such as VIF, TOL, CVIF, Leamer, IND1, and IND2 etc, when method argument is used. For example, method="VIF".

corr

Whether to display correlation matrix or not Inter=TRUE.

detr

Determinant default threshold, detr=0.01.

red

Red indicator default threshold, red=0.5.

theil

Theil's indicator default threshold, theil=0.5.

cn

Condition number default threshold, cn=30.

vif

Default 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 for TOL measure, TOL=0.10.

ind1

Default threshold for IND1 indicator, ind1=0.02.

ind2

Default threshold for IND2 indicator, ind2=0.7.

leamer

Default threshold for Leamer's method, leamer=0.1.

all

Returns all individual measure of collinearity in a matrix of 0 (not detected) or 1 (detected).

Extra argument(s) if used will be ignored.

References

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

Belsley, D. A., Kuh, E., and Welsch, R. E. Regression Diagnostics: Identifying Influential Data and Sources of Collinearity. John Wiley \& Sons, New York, 1980.

Chatterjee, S. and Hadi, A. S. Regression Analysis by Example. John Wiley \& Sons, 4th edition, New York, 2006.

Greene, W. H. Econometric Analysis. Prentice--Hall, Upper Saddle River, New Jersey, 4th edition, 2000.

Imdad, M. U. Addressing Linear Regression Models with Correlated Regressors: Some Package Development in R (Doctoral Thesis, Department of Statistics, Bahauddin Zakariya University, Multan, Pakistan), 2017.

Imdadullah, M., Aslam, M., and Altaf, S. mctest: An R Package for Detection of Collinearity Among Regressors. The R Journal, 8(2):499--509, 2016.

Imdad, M. U., Aslam, M., Altaf, S., and Ahmed, M. Some New Diagnostics of Multicollinearity in Linear Regression Model. Sains Malaysiana, 48(2): 2051--2060, 2019.

See Also

overall collinearity diagnostics omcdiag, individual collinearity diagnostics imcdiag, collinearity plots mc.plot

Examples

Run this code
# NOT RUN {
## Hald Cement data
data(Hald)
model <- lm(y~X1+X2+X3+X4, data = as.data.frame(Hald))

## Overall diagnostic measures and eigenvalues with intercept term
mctest(model)

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

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

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

IND1<-mctest(model, type="i", method="IND1")
IND1[[1]][,1] # named IND1 values only

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

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

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

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

## Individual collinearity diagnostic measures in matrix of 0 or 1
mctest(model, all = TRUE)
mctest(model, method = "VIF", all = TRUE)
mctest(model, type="b", all = TRUE)

# }

Run the code above in your browser using DataLab