We published an accompanying paper to illustrate the use of p-value functions:
Infanger D, Schmidt-Trucksäss A. (2019): P value functions: An underused method to present research results and to promote quantitative reasoning. Statistics in Medicine. 38: 4189-4197. doi: 10.1002/sim.8293.
The code and instructions to reproduce all graphics in our paper can be found in the following GitHub repository: https://github.com/DInfanger/pvalue_functions
This is the repository for the R-package pvaluefunctions.
The package contains R functions to create graphics of p-value
functions, confidence distributions, confidence densities, or the Surprisal value
(S-value) (Greenland 2019).
You can install the package directly from CRAN by typing
install.packages("pvaluefunctions"). After installation,
load it in R using library(pvaluefunctions). The
development version can be installed from GitHub with
remotes::install_github("DInfanger/pvaluefunctions").
The package depends on the following R packages, which are installed automatically together with the package:
For more examples and code, see the vignette.



Bender R, Berg G, Zeeb H. (2005): Tutorial: using confidence curves in medical research. Biom J. 47(2): 237-47.
Berrar D (2017): Confidence Curves: an alternative to null hypothesis significance testing for the comparison of classifiers. Mach Learn. 106:911-949.
Fraser D. A. S. (2019): The p-value function and statistical inference. Am Stat. 73:sup1, 135-147.
Greenland S (2019): Valid P-Values Behave Exactly as They Should: Some Misleading Criticisms of P-Values and Their Resolution with S-Values. Am Stat. 73sup1, 106-114.
Infanger D, Schmidt-Trucksäss A. (2019): P value functions: An underused method to present research results and to promote quantitative reasoning. Stat Med. 38, 4189-4197. doi: 10.1002/sim.8293.
Poole C. (1987a): Beyond the confidence interval. Am J Public Health. 77(2): 195-9.
Poole C. (1987b): Confidence intervals exclude nothing. Am J Public Health. 77(4): 492-3.
Rafi Z, Greenland S. (2020): Semantic and cognitive tools to aid statistical science: replace confidence and significance by compatibility and surprise. BMC Med Res Methodol. 20, 244. doi: 10.1186/s12874-020-01105-9.
Rosenthal R, Rubin DB. (1994): The counternull value of an effect size: A new statistic. Psychol Sci. 5(6): 329-34.
Schweder T, Hjort NL. (2016): Confidence, likelihood, probability: statistical inference with confidence distributions. New York, NY: Cambridge University Press.
Xie M, Singh K, Strawderman WE. (2011): Confidence Distributions and a Unifying Framework for Meta-Analysis. J Am Stat Assoc. 106(493): 320-33. doi: 10.1198/jasa.2011.tm09803.
Xie Mg, Singh K. (2013): Confidence distribution, the frequentist distribution estimator of a parameter: A review. Internat Statist Rev. 81(1): 3-39.
#> R version 4.6.2 (2026-10-29 ucrt)
#> Platform: x86_64-w64-mingw32/x64
#> Running under: Windows 11 x64 (build 26300)
#>
#> Matrix products: default
#> LAPACK version 3.12.1
#>
#> locale:
#> [1] LC_COLLATE=German_Switzerland.utf8 LC_CTYPE=German_Switzerland.utf8
#> [3] LC_MONETARY=German_Switzerland.utf8 LC_NUMERIC=C
#> [5] LC_TIME=German_Switzerland.utf8
#>
#> time zone: Europe/Zurich
#> tzcode source: internal
#>
#> attached base packages:
#> [1] stats graphics grDevices utils datasets methods base
#>
#> other attached packages:
#> [1] pvaluefunctions_1.8.0
#>
#> loaded via a namespace (and not attached):
#> [1] vctrs_0.7.3 cli_3.6.6 knitr_1.52 rlang_1.3.0
#> [5] xfun_0.62 otel_0.3.0 generics_0.1.4 S7_1.0.0
#> [9] glue_1.8.1 htmltools_0.5.9 scales_1.4.0 rmarkdown_2.32
#> [13] grid_4.6.2 tibble_3.3.1 evaluate_1.0.5 fastmap_1.2.0
#> [17] yaml_2.3.12 lifecycle_1.0.5 compiler_4.6.2 dplyr_1.2.1
#> [21] RColorBrewer_1.1-3 pkgconfig_2.0.3 rstudioapi_0.19.0 farver_2.1.2
#> [25] digest_0.6.39 R6_2.6.1 tidyselect_1.2.1 dichromat_2.0-1
#> [29] pillar_1.11.1 magrittr_2.0.5 withr_3.0.3 tools_4.6.2
#> [33] gtable_0.3.6 ggplot2_4.0.4