Apply two-sample KS test to all pairs of datasets contained within a dataframe
Source:R/compare_data.R
ks_compare.Rd
Apply two-sample KS test to all pairs of datasets contained within a dataframe
Arguments
- df
A dataframe of datasets with columns:
name
andtime
, one uniquename
per dataset- correct_multiple_comparisons
If
TRUE
, an adjustment will be made to the p-values based on Holm, 1979, A simple sequentially rejective multiple test procedure
Examples
data <- prepare_data(dplyr::filter(
carpenter_williams_1995,
participant == "b"
))
ks_compare(data)
#> Warning: p-value will be approximate in the presence of ties
#> Warning: p-value will be approximate in the presence of ties
#> Warning: p-value will be approximate in the presence of ties
#> Warning: p-value will be approximate in the presence of ties
#> Warning: p-value will be approximate in the presence of ties
#> Warning: p-value will be approximate in the presence of ties
#> Warning: p-value will be approximate in the presence of ties
#> Warning: p-value will be approximate in the presence of ties
#> Warning: p-value will be approximate in the presence of ties
#> Warning: p-value will be approximate in the presence of ties
#> Warning: p-value will be approximate in the presence of ties
#> Warning: p-value will be approximate in the presence of ties
#> Warning: p-value will be approximate in the presence of ties
#> Warning: p-value will be approximate in the presence of ties
#> Warning: p-value will be approximate in the presence of ties
#> Warning: p-value will be approximate in the presence of ties
#> Warning: p-value will be approximate in the presence of ties
#> Warning: p-value will be approximate in the presence of ties
#> Warning: p-value will be approximate in the presence of ties
#> Warning: p-value will be approximate in the presence of ties
#> Warning: p-value will be approximate in the presence of ties
#> name1 name2 D p_value
#> D...1 b_p05 b_p10 0.24236774 8.242450e-16
#> D...2 b_p05 b_p25 0.53065300 8.104245e-80
#> D...3 b_p05 b_p50 0.66043494 1.079212e-148
#> D...4 b_p05 b_p75 0.70992975 2.392157e-192
#> D...5 b_p05 b_p90 0.77235259 8.563762e-253
#> D...6 b_p05 b_p95 0.80149617 7.009049e-279
#> D...7 b_p10 b_p25 0.31689876 2.448127e-34
#> D...8 b_p10 b_p50 0.48014114 4.476983e-99
#> D...9 b_p10 b_p75 0.55927635 1.687271e-155
#> D...10 b_p10 b_p90 0.62695131 1.475795e-224
#> D...11 b_p10 b_p95 0.67768643 3.722007e-271
#> D...12 b_p25 b_p50 0.19463212 2.924255e-18
#> D...13 b_p25 b_p75 0.27841580 1.222154e-43
#> D...14 b_p25 b_p90 0.36795184 1.700954e-89
#> D...15 b_p25 b_p95 0.44470214 4.947388e-136
#> D...16 b_p50 b_p75 0.09136495 1.578924e-07
#> D...17 b_p50 b_p90 0.20267955 2.773457e-44
#> D...18 b_p50 b_p95 0.27838393 2.761189e-89
#> D...19 b_p75 b_p90 0.12102841 8.414813e-24
#> D...20 b_p75 b_p95 0.19784556 2.732080e-70
#> D...21 b_p90 b_p95 0.08168901 1.980667e-22