Compute outlying scagnostic measure using MST

sc_outlying(x, y)

# S3 method for default
sc_outlying(x, y)

# S3 method for scree
sc_outlying(x, y = NULL)

# S3 method for igraph
sc_outlying(x, y)

Arguments

x

numeric vector of x values

y

numeric vector of y values

Value

A "numeric" object that gives the plot's outlying score.

Examples

  require(ggplot2)
  require(tidyr)
  require(dplyr)
  ggplot(datasaurus_dozen, aes(x=x, y=y)) +
    geom_point() +
    facet_wrap(~dataset, ncol=3, scales = "free")

  sc_outlying(datasaurus_dozen_wide$dino_x, datasaurus_dozen_wide$dino_y)
#> [1] 0
  sc_outlying(datasaurus_dozen_wide$dots_x, datasaurus_dozen_wide$dots_y)
#> [1] 0.05181233
  sc_outlying(datasaurus_dozen_wide$h_lines_x, datasaurus_dozen_wide$h_lines_y)
#> [1] 0.08738286