Description Usage Arguments Details Value Note Author(s) References See Also Examples
Computes eigenvalues, condition indices and variance decomposition proportions of X'X or its related correlation matrix R (see Belsley et al. (1980) <doi: 10.1007/BF00426854> ; Belsley, 1991; Kendall, 1957 and Silvey , 1969).
1 |
mod |
A model object, not necessarily type |
na.rm |
Whether to remove missing observations. |
Inter |
Whether to include or exclude Intercept term, by default |
prop |
variance proportion default threshold, |
... |
Extra argument(s) if used will be ignored. |
The eigprop
function can be used to detect the existence of multicollinearity among regressors. The function computes eigenvalues, condition indices and variance decomposition proportions of regression coefficients. To check the linear dependencies associated with the corresponding eigenvalue, the eigprop
compares variance proportion with threshold value (default is 0.5) and displays the proportions greater than given threshold from each row and column, if any. If Inter = TRUE
, eigenvalues, condition indices and variance proportions are computed without intercept term. A list object of class "eigp" is returned:
The eigprop
objects are:
ev |
A vector of eigenvalues. By default |
ci |
A vector of condition indices. By default |
call |
The matched call. |
Inter |
logical, if |
pi |
A matrix of variance decomposition proportions. By default |
prop |
Default threshold proportion for comparison purpose. |
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.
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.
Silvey, S. D. Multicollinearity and imprecise estimation. Journal of the Royal Statistical Society, Series B (Methodological), 31(3):539–552, 1969.
Overall collinearity diagnostics omcdiag
, Individual collinearity diagnostics imcdiag
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ## Hald Cement data
data(Hald)
model <- lm(y~X1+X2+X3+X4, data = as.data.frame(Hald))
# with Intercept term
eigprop(model)
# without Intercept term
eigprop(model, Inter = FALSE)
# different proportion threshold
eigprop(model, prop = 0.45)
# only variance proportions
eigprop(model)$pi
# only condition indices
eigprop(model)$ci
# only eigenvalues
eigprop(model)$ev
|
Call:
eigprop(mod = model)
Eigenvalues CI (Intercept) X1 X2 X3 X4
1 4.1197 1.0000 0.0000 0.0004 0.0000 0.0002 0.0000
2 0.5539 2.7272 0.0000 0.0100 0.0000 0.0027 0.0001
3 0.2887 3.7775 0.0000 0.0006 0.0003 0.0016 0.0017
4 0.0376 10.4621 0.0001 0.0574 0.0028 0.0457 0.0009
5 0.0001 249.5783 0.9999 0.9316 0.9969 0.9498 0.9973
===============================
Row 5==> X1, proportion 0.931570 >= 0.50
Row 5==> X2, proportion 0.996865 >= 0.50
Row 5==> X3, proportion 0.949846 >= 0.50
Row 5==> X4, proportion 0.997299 >= 0.50
Call:
eigprop(mod = model, Inter = FALSE)
Eigenvalues CI X1 X2 X3 X4
1 3.1231 1.0000 0.0103 0.0071 0.0080 0.0182
2 0.5535 2.3754 0.1556 0.0025 0.0598 0.0308
3 0.2883 3.2911 0.0081 0.0739 0.0375 0.4706
4 0.0351 9.4325 0.8261 0.9165 0.8947 0.4804
===============================
Row 4==> X1, proportion 0.826086 >= 0.50
Row 4==> X2, proportion 0.916470 >= 0.50
Row 4==> X3, proportion 0.894737 >= 0.50
Call:
eigprop(mod = model, prop = 0.45)
Eigenvalues CI (Intercept) X1 X2 X3 X4
1 4.1197 1.0000 0.0000 0.0004 0.0000 0.0002 0.0000
2 0.5539 2.7272 0.0000 0.0100 0.0000 0.0027 0.0001
3 0.2887 3.7775 0.0000 0.0006 0.0003 0.0016 0.0017
4 0.0376 10.4621 0.0001 0.0574 0.0028 0.0457 0.0009
5 0.0001 249.5783 0.9999 0.9316 0.9969 0.9498 0.9973
===============================
Row 5==> X1, proportion 0.931570 >= 0.45
Row 5==> X2, proportion 0.996865 >= 0.45
Row 5==> X3, proportion 0.949846 >= 0.45
Row 5==> X4, proportion 0.997299 >= 0.45
(Intercept) X1 X2 X3 X4
1 5.508939e-06 0.0003688922 1.832878e-05 0.000210219 3.640648e-05
2 8.812348e-08 0.0100384607 1.264739e-05 0.002658636 1.007001e-04
3 3.060952e-07 0.0005755116 3.198053e-04 0.001592054 1.680306e-03
4 1.267880e-04 0.0574472804 2.783994e-03 0.045693504 8.837332e-04
5 9.998673e-01 0.9315698551 9.968652e-01 0.949845587 9.972989e-01
[1] 1.000000 2.727214 3.777529 10.462074 249.578252
[1] 4.119699e+00 5.538943e-01 2.887021e-01 3.763830e-02 6.613815e-05
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.