Learn R Programming

mctest (version 1.3.1)

eigprop: Eigenvalues and Variance Decomposition Proportion

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

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.

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.

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:

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

Run this code
# NOT RUN {
## 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
# }

Run the code above in your browser using DataLab