Computes standardized differences between two groups for numeric terrain variables.
Details
Cohen's d is computed as the difference in group means divided by pooled standard deviation. Exactly two non-missing groups are required.
Examples
df <- data.frame(group = rep(c("a", "b"), each = 5), slope = 1:10)
terrain_effect_size(df, group = "group", vars = "slope")
#> # A tibble: 1 × 7
#> variable group_1 group_2 mean_1 mean_2 effect_size method
#> <chr> <chr> <chr> <dbl> <dbl> <dbl> <chr>
#> 1 slope a b 3 8 -3.16 cohens_d
