View source: R/convert_pd_to_p.R
pd_to_p  R Documentation 
Enables a conversion between Probability of Direction (pd) and pvalue.
pd_to_p(pd, ...)
## S3 method for class 'numeric'
pd_to_p(pd, direction = "twosided", verbose = TRUE, ...)
p_to_pd(p, direction = "twosided", ...)
convert_p_to_pd(p, direction = "twosided", ...)
convert_pd_to_p(pd, ...)
pd 
A Probability of Direction (pd) value (between 0 and 1). Can also
be a data frame with a column named 
... 
Arguments passed to or from other methods. 
direction 
What type of pvalue is requested or provided. Can be

verbose 
Toggle off warnings. 
p 
A pvalue. 
Conversion is done using the following equation (see Makowski et al., 2019):
When direction = "twosided"
p = 2 \times (1  p_d)
When direction = "onesided"
p = 1  p_d
Note that this conversion is only valid when the lowest possible values of pd
is 0.5  i.e., when the posterior represents continuous parameter space (see
p_direction()
). If any pd < 0.5 are detected, they are converted to a p
of 1, and a warning is given.
A pvalue or a data frame with a pvalue column.
Makowski, D., BenShachar, M. S., Chen, S. H. A., and Lüdecke, D. (2019). Indices of Effect Existence and Significance in the Bayesian Framework. Frontiers in Psychology 2019;10:2767. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.3389/fpsyg.2019.02767")}
pd_to_p(pd = 0.95)
pd_to_p(pd = 0.95, direction = "onesided")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.