File: pbetat.Rd

package info (click to toggle)
r-cran-learnbayes 2.15.1-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 1,864 kB
  • sloc: sh: 15; makefile: 2
file content (34 lines) | stat: -rw-r--r-- 752 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
\name{pbetat}
\alias{pbetat}
\title{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{
  \item{p0}{value of the proportion to be tested }
  \item{prob}{prior probability of the hypothesis}
  \item{ab}{vector of parameter values of the beta prior under the alternative hypothesis}
  \item{data}{vector containing the number of successes and number of failures}
}

\value{
  \item{bf}{the Bayes factor
  in support of the null hypothesis}
  \item{post}{the posterior probability
  of the null hypothesis}
}

\author{Jim Albert}

\examples{
p0=.5
prob=.5
ab=c(10,10)
data=c(5,15)
pbetat(p0,prob,ab,data)
}

\keyword{models}