eigp: Eigenvalues and Variance Decomposition Proportion

Description Usage Arguments Details Value Note Author(s) References See Also Examples

Description

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).

Usage

1
eigprop(mod, na.rm = TRUE, Inter = TRUE, prop = 0.5, ...)

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 =FALSE.

prop

variance proportion default threshold, prop=0.5.

...

Extra argument(s) if used will be ignored.

Details

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:

Value

The eigprop objects are:

ev

A vector of eigenvalues. By default Inter = TRUE, eigenvalues are returned with intercept term included in the X matrix.

ci

A vector of condition indices. By default Inter = TRUE, condition indices are returned with intercept term included in the X matrix.

call

The matched call.

Inter

logical, if TRUE (the default value) eigenvalues, condition indices and variance proportions are returned with intercept term included.

pi

A matrix of variance decomposition proportions. By default Inter = TRUE, variance decomposition proportions are returned with intercept term included in the X matrix.

prop

Default threshold proportion for comparison purpose.

Note

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.

Author(s)

Muhammad Imdad Ullah, Muhammad Aslam

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.

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.

See Also

Overall collinearity diagnostics omcdiag, Individual collinearity diagnostics imcdiag

Examples

 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

Example output

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

mctest documentation built on July 8, 2020, 6:55 p.m.