Unimodality test for list of one or multiple sets of values
Source:R/selectionEG_helpers.R
unimodal_test.Rd
Test of unimodality based in Hartigans' dip statistic D.
Calculations of the statistic and p-value are done as in
dip.test
.
Arguments
- values_list
named list of vectors of class numeric. Names in
values_list
are required. If only one set of values is used the list must contain only one element.- MC_replicates
(numeric) number of replicates for the Monte Carlo test to calculate p-value. Default = 1000.
Examples
# Data
data("dist_list", package = "biosurvey")
# Testing unimodality
u_test <- unimodal_test(values_list = dist_list, MC_replicates = 500)
u_test
#> Block D p_alue
#> D 8 0.02000484 0.404
#> D1 5 0.01838244 0.000
#> D2 12 0.09605703 0.000
#> D3 39 0.11510845 0.000
#> D4 36 0.03373249 0.000
#> D5 58 0.12869798 0.088