Learn R Programming

bayess (version 1.4)

solbeta: Recursive resolution of beta prior calibration

Description

In the capture-recapture experiment of Chapter 5, the prior information is represented by a prior expectation and prior confidence intervals. This function derives the corresponding beta $B(\alpha,\beta)$ prior distribution by a divide-and-conquer scheme.

Usage

solbeta(a, b, c, prec = 10^(-3))

Arguments

a
lower bound of the prior 95%~confidence interval
b
upper bound of the prior 95%~confidence interval
c
mean of the prior distribution
prec
maximal precision on the beta coefficient $\alpha$

Value

  • alphafirst coefficient of the beta distribution
  • betasecond coefficient of the beta distribution

Details

Since the mean $\mu$ of the beta distribution is known, there is a single free parameter $\alpha$ to determine, since $\beta=\alpha(1-\mu)/\mu$. The function solbeta searches for the corresponding value of $\alpha$, starting with a precision of $1$ and stopping at the requested precision prec.

See Also

probet

Examples

Run this code
solbeta(.1,.5,.3,10^(-4))

Run the code above in your browser using DataLab