Skip to contents

The plot() method for the performance::check_collinearity() function.

Usage

# S3 method for see_check_collinearity
plot(
  x,
  data = NULL,
  colors = c("#3aaf85", "#1b6ca8", "#cd201f"),
  size_point = 4,
  size_line = 0.8,
  ...
)

Arguments

x

An object.

data

The original data used to create this object. Can be a statistical model.

colors

Character vector of length two, indicating the colors (in hex-format) for points and line.

size_point

Numeric specifying size of point-geoms.

size_line

Numeric value specifying size of line geoms.

...

Arguments passed to or from other methods.

Value

A ggplot2-object.

Examples

library(performance)
m <- lm(mpg ~ wt + cyl + gear + disp, data = mtcars)
result <- check_collinearity(m)
result
#> # Check for Multicollinearity
#> 
#> Low Correlation
#> 
#>  Term  VIF    VIF 95% CI Increased SE Tolerance Tolerance 95% CI
#>   cyl 5.41 [3.42,  9.04]         2.33      0.18     [0.11, 0.29]
#> 
#> Moderate Correlation
#> 
#>  Term  VIF    VIF 95% CI Increased SE Tolerance Tolerance 95% CI
#>  gear 1.53  [1.19, 2.51]         1.24      0.65     [0.40, 0.84]
#>    wt 5.05 [3.21,  8.41]         2.25      0.20     [0.12, 0.31]
#>  disp 9.97 [6.08, 16.85]         3.16      0.10     [0.06, 0.16]
plot(result)