Calculate the top scagnostic for each pair of variables
top_pairs(scags_data)
A dataset of scagnostic values that was returned by calc_scags or calc_scags_wide
A data frame where each row is a each scatter plot, its highest valued scagnostic, and its respective value
calc_scags calc_scags_wide top_scags
#an example using calc_scags
require(dplyr)
datasaurus_dozen %>%
group_by(dataset) %>%
summarise(calc_scags(x,y, scags=c("monotonic", "outlying", "convex"))) %>%
top_pairs()
#> # A tibble: 13 × 3
#> dataset scag value
#> <chr> <chr> <dbl>
#> 1 away convex 0.795
#> 2 bullseye convex 0.890
#> 3 circle outlying 0.153
#> 4 dino convex 0.895
#> 5 dots monotonic 0.126
#> 6 h_lines convex 0.953
#> 7 high_lines convex 0.359
#> 8 slant_down convex 0.922
#> 9 slant_up convex 0.914
#> 10 star convex 0.555
#> 11 v_lines convex 0.938
#> 12 wide_lines convex 0.311
#> 13 x_shape convex 0.165
#an example using calc_scags_wide
data(pk)
scags_data <- calc_scags_wide(pk[,2:5], scags=c("outlying","clumpy","monotonic"))
top_pairs(scags_data)
#> # A tibble: 6 × 4
#> Var1 Var2 scag value
#> <fct> <fct> <chr> <dbl>
#> 1 MDVP:Fhi(Hz) MDVP:Fo(Hz) clumpy 0.934
#> 2 MDVP:Flo(Hz) MDVP:Fo(Hz) clumpy 0.878
#> 3 MDVP:Flo(Hz) MDVP:Fhi(Hz) clumpy 0.971
#> 4 MDVP:Jitter(%) MDVP:Fo(Hz) clumpy 0.915
#> 5 MDVP:Jitter(%) MDVP:Fhi(Hz) clumpy 0.922
#> 6 MDVP:Jitter(%) MDVP:Flo(Hz) clumpy 0.912