Learn R Programming

ProbBayes (version 1.1)

gibbs_betabin: Gibbs sampling of the beta-binomial distribution

Description

Implements Gibbs sampling of the beta-binomial distribution

Usage

gibbs_betabin(n, a, b, p = 0.5, iter = 1000)

Arguments

n

binomial sample size

a

first beta shape parameter

b

second beta shape parameter

p

starting value of proportion in algorithm

iter

number of iterations

Value

matrix of simulated draws from the algorithm

Examples

Run this code
# NOT RUN {
sp <- gibbs_betabin(20, 5, 5, 100)
# }

Run the code above in your browser using DataLab