mcvis: Multi-collinearity Visualization

View source: R/mcvis.R

mcvisR Documentation

Multi-collinearity Visualization

Description

Multi-collinearity Visualization

Usage

mcvis(
  X,
  sampling_method = "bootstrap",
  standardise_method = "studentise",
  times = 1000L,
  k = 10L
)

Arguments

X

A matrix of regressors (without intercept terms).

sampling_method

The resampling method for the data. Currently supports 'bootstrap' or 'cv' (cross-validation).

standardise_method

The standardisation method for the data. Currently supports 'euclidean' (default, centered by mean and divide by Euclidiean length) and 'studentise' (centred by mean and divide by standard deviation) and 'none' (no standardisation)

times

Number of resampling runs we perform. Default is set to 1000.

k

Number of partitions in averaging the MC-index. Default is set to 10.

Value

A list of outputs:

  • t_square:The t^2 statistics for the regression between the VIFs and the tau's.

  • MC:The MC-indices

  • col_names:Column names (export for plotting purposes)

Author(s)

Chen Lin, Kevin Wang, Samuel Mueller

Examples

set.seed(1)
p = 10
n = 100
X = matrix(rnorm(n*p), ncol = p)
X[,1] = X[,2] + rnorm(n, 0, 0.1)
mcvis_result = mcvis(X = X)
mcvis_result

leaffur/mcvis documentation built on Aug. 28, 2023, 9:54 a.m.