Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

pbetat

Bayesian test of a proportion


Description

Bayesian test that a proportion is equal to a specified value using a beta prior

Usage

pbetat(p0,prob,ab,data)

Arguments

p0

value of the proportion to be tested

prob

prior probability of the hypothesis

ab

vector of parameter values of the beta prior under the alternative hypothesis

data

vector containing the number of successes and number of failures

Value

bf

the Bayes factor in support of the null hypothesis

post

the posterior probability of the null hypothesis

Author(s)

Jim Albert

Examples

p0=.5
prob=.5
ab=c(10,10)
data=c(5,15)
pbetat(p0,prob,ab,data)

LearnBayes

Functions for Learning Bayesian Inference

v2.15.1
GPL (>= 2)
Authors
Jim Albert
Initial release
2018-03-18

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.