colindiag: (Multi)collinearity diagnosis of a correlation matrix of...

Description Usage Arguments Value Author(s) Examples

Description

Perform a (multi)collinearity diagnosis of a correlation matrix of predictor variables based on the analysis of eigenvalues and eigenvectors.

Usage

1
colindiag(x, n = NULL)

Arguments

x

The data to be analyzed. Must be a symmetric correlation matrix or a dataframe containing the predictor variables

n

If a correlation matrix is the data input, thus n is the number of objects used to compute the correlation coefficients. When a dataframe with variables is the data input, the sample size is automatically calculated.

Value

cormat

A symmetric Pearson's coefficient correlation matrix between the variables

corlist

A hypothesis testing for each of the correlation coefficients

evalevet

The eigenvalues with associated eigenvectors of the correlation matrix

VIF

The Variance Inflation Factors, being the diagonal elements of the inverse of the correlation matrix.

CN

The Condition Number of the correlation matrix, given by the ratio between the largest and smallest eigenvalue.

det

The determinant of the correlation matrix.

largest_corr

The largest correlation (in absolute value) observed.

smallest_corr

The smallest correlation (in absolute value) observed.

weight_var

The variables with largest eigenvector (largest weight) in the eigenvalue of smallest value, sorted in decreasing order.

Author(s)

Tiago Olivoto tiagoolivoto@gmail.com

Examples

1
2
3
4
5
6
x = cor(iris[,1:4])
n = nrow(iris)
colin_cor = colindiag(x = x, n = n)

data = data.frame(iris[,1:4])
colin_data = colindiag(data)

TiagoOlivoto/cursoR documentation built on May 13, 2019, 1:23 p.m.