Description Usage Arguments Note Author(s) References See Also Examples
The function mctest
display overall, individual or both types of multicollinearity diagnostic measures from omcdiag
and imcdiag
functions, respectively.
1 2 3 |
mod |
A model object, not necessarily type |
na.rm |
Whether to remove missing observations. |
Inter |
Whether to include or exclude Intercept term. By default |
type |
Displays overall, individual or both type of collinearity diagnostics. Overall collinearity diagnostics are displayed by default with eigenvalues and condition indexes, when |
method |
Specific individual measure of collinearity such as VIF, TOL, CVIF, Leamer, IND1, and IND2 etc, when |
corr |
Whether to display correlation matrix or not |
detr |
Determinant default threshold, |
red |
Red indicator default threshold, |
theil |
Theil's indicator default threshold, |
cn |
Condition number default threshold, |
vif |
Default threshold for VIF measure, |
conf |
Default confidence level for Farrar's test, |
cvif |
Default threshold for CVIF measure, |
tol |
Default threshold for TOL measure, |
ind1 |
Default threshold for IND1 indicator, |
ind2 |
Default threshold for IND2 indicator, |
leamer |
Default threshold for Leamer's method, |
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. |
Missing values in data will be removed by default. There is no method for the detection of multicollinearity, if missing values exists in the data set
Muhammad Imdad Ullah, Muhammad Aslam
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.
overall collinearity diagnostics omcdiag, individual collinearity diagnostics imcdiag
, collinearity plots mc.plot
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | ## 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.