mc_adjust handles issues with multi-collinearity.
mc_adjust(data, min_var = 0.1, max_cor = 0.9, action = "exclude")
| data | named numeric data object (either data frame or matrix) |
|---|---|
| min_var | numeric value between 0-1 for the minimum acceptable variance (default = 0.1) |
| max_cor | numeric value between 0-1 for the maximum acceptable correlation (default = 0.9) |
| action | select action for handling columns causing multi-collinearity issues
|
mc_adjust returns the numeric data object supplied minus variables
violating the minimum acceptable variance (min_var) and the
maximum acceptable correlation (max_cor) levels.
mc_adjust handles issues with multi-collinearity by first removing
any columns whose variance is close to or less than min_var. Then, it
removes linearly dependent columns. Finally, it removes any columns that have
a high absolute correlation value equal to or greater than max_cor.
# NOT RUN { x <- matrix(runif(100), ncol = 10) x %>% mc_adjust() x %>% mc_adjust(min_var = .15, max_cor = .75, action = "select") # }