Learn R Programming

extras (version 0.7.3)

pvalue: Bayesian P-Value

Description

A Bayesian p-value (p) is here defined in terms of the quantile-based (1-p) * 100% credible interval (CRI) that just includes a threshold (Kery and Schaub 2011). By default a p-value of 0.05 indicates that the 95% CRI just includes 0.

Usage

pvalue(x, threshold = 0, na_rm = FALSE)

Value

A number between 0 and 1.

Arguments

x

A numeric vector of MCMC values.

threshold

A number of the threshold value.

na_rm

A flag specifying whether to remove missing values.

References

Kery, M., and Schaub, M. 2011. Bayesian population analysis using WinBUGS: a hierarchical perspective. Academic Press, Boston. Available from https://www.vogelwarte.ch/en/research/population-biology/book-bpa/.

See Also

Other summary: kurtosis(), lower(), pzeros(), skewness(), svalue(), upper(), variance(), xtr_mean(), xtr_median(), xtr_sd(), zeros(), zscore()

Examples

Run this code
pvalue(as.numeric(0:100))

Run the code above in your browser using DataLab