sim_post {bandit}R Documentation

sim_post

Description

Simulate the posterior distribution the Bayesian probabilities for each arm being the best binomial bandit

Usage

sim_post(x, n, alpha = 1, beta = 1, ndraws = 5000)

Arguments

x

as in prop.test, a vector of the number of successes

n

as in prop.test, a vector of the number of trials

alpha

shape parameter alpha for the prior beta distribution.

beta

shape parameter beta for the prior beta distribution.

ndraws

number of random draws from the posterior

Author(s)

Thomas Lotze and Markus Loecher

Examples


x=c(10,20,30,50)
n=c(100,102,120,130)
sim_post(x,n)


[Package bandit version 0.5.1 Index]