This function takes a vector of statistics and calculates the empirical p-value, that is, how many fall on the other side of zero. It calculates a two-tailed p-value.
Value
a named vector with the number of values falling at or below zero, above zero, and the empirical p-value.
Examples
empirical_pvalue(rnorm(100))
#> <= 0 > 0 p-value
#> 45.0 55.0 0.9