p2s: Convert p-values into s-values

View source: R/P-value_Functions.R

p2sR Documentation

Convert p-values into s-values

Description

This function converts p-values into Shannon information values (s-values).

Usage

p2s(p, digits = NULL)

Arguments

p

A numeric p-value (or numeric vector of p-values), obtained from running a statistical model or test. All values should be proportions within the closed unit interval (0 <= p <= 1).

digits

An integer specifying the number of decimal places to used when rounding the s-value. Defaults to NULL, which does not round the result.

Details

S-values are a rescaling of p-values that measure the information against the null hypothesis of a statistical test, as measured in bits. They are discussed in Greenland (2019) and Wasserstein, Schirm, and Lazar (2019). S-values fall in the range [0, Inf]. When p = 0, s = Inf and when p = 1, s = 0.

Value

A numeric vector of s-values of the same length as p.

References

Greenland, S. (2019). Valid p-values behave exactly as they should: Some misleading criticisms of p-values and their resolution with s-values. The American Statistician, 73(Supplement 1), 106-114. doi:10.1080/00031305.2018.1529625

Wasserstein, R. L., Schirm, A. L., & Lazar, N. A. (2019). Moving to a world beyond "p < .05". The American Statistician, 73(Supplement 1), 1-19. doi:10.1080/00031305.2019.1583913

Examples

p2s(p = .25)
p2s(p = c(.0001, .46))
p2s(p = .0001, digits = 1)
p2s(p = NA) # Missing p returns a missing value.


sjpierce/piercer documentation built on Dec. 30, 2024, 3:28 p.m.