View source: R/P-value_Functions.R
convertp | R Documentation |
This function converts p-values into three different measures: s-values, Bayes Factor Bounds (BFBs), and posterior probabilities that the alternative hypotheis H1 is true.
convertp(p, digits = NULL)
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 results. Defaults to NULL, which does not round the results. |
=============================================================================
This function applies p2s
, p2bfb
, and
p2pp
to the p-values supplied. It is a convenient way to get
all three results with a single function call.
A data frame containing three numeric columns values, each the same length as p: s-value, BFB, and posterior probability.
Benjamin, D. J., & Berger, J. O. (2019). Three recommendations for improving the use of p-values. The American Statistician, 73 (Supplement 1), 186-191. doi:10.1080/00031305.2018.1543135
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
p2s
for s-values, p2bfb
for BFBs, and
p2pp
for posterior probabilities.
convertp(.05)
convertp(c(.1, .05, .01, .005, .001, .0001, .00001), digits = 2)
convertp(p = NA) # Missing p returns a missing value.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.