File: predplot.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 (26 lines) | stat: -rw-r--r-- 662 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
\name{predplot}
\alias{predplot}
\title{Plot of predictive distribution for binomial sampling with a beta prior}
\description{
For a proportion problem with a beta prior, plots the prior predictive distribution
of the number of successes in n trials and displays the observed number of successes.
}
\usage{
predplot(prior,n,yobs)
}
\arguments{
  \item{prior}{vector of parameters for beta prior}
  \item{n}{sample size}
  \item{yobs}{observed number of successes}
}

\author{Jim Albert}

\examples{
prior=c(3,10)  # proportion has a beta(3, 10) prior
n=20   # sample size
yobs=10  # observed number of successes
predplot(prior,n,yobs)
}

\keyword{models}