ibetabinomial.post {BayesianPlatformDesignTimeTrend}R Documentation

ibetabinomial.post

Description

This function calculates the posterior probability of each active treatment arm better than control using betabinomial model

Usage

ibetabinomial.post(n, y, pi.star = 0.5, pess = 2)

Arguments

n

A vector of treated patients for each arm (The first element is for control)

y

A vector of treated patient outcomes for each arm (The first element is for control)

pi.star

The prior response probability. The default is 0.5

pess

The effective sample size of beta prior. The default is 2

Value

A vector posterior probability of each active treatment arm better than control

Author(s)

Ziyan Wang

Examples

n <- c(20,20,20,20)
y <- c(12,12,12,6)
ibetabinomial.post(n, y, pi.star = 0.5, pess = 2)
#[1] 0.5000000 0.5000000 0.0308018

[Package BayesianPlatformDesignTimeTrend version 1.2.3 Index]