R: Multi-Collinearity Adjustment

mc_adjust {anomalyDetection} | R Documentation

## Multi-Collinearity Adjustment

### Description

`mc_adjust` handles issues with multi-collinearity.

### Usage

    mc_adjust(data, min_var = 0.1, max_cor = 0.9, action = "exclude")

### Arguments

`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 `exclude`: exclude all columns causing multi-collinearity issues (default) `select`: identify the columns causing multi-collinearity issues and allow the user to interactively select those columns to remove

### Details

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

### Value

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

### Examples

    ## Not run:
    x <- matrix(runif(100), ncol = 10)
    x %>%
      mc_adjust()

    x %>%
      mc_adjust(min_var = .15, max_cor = .75, action = "select")

    ## End(Not run)

[Package anomalyDetection version 0.2.5 Index]