ibetabinomial.post {BayesianPlatformDesignTimeTrend} | R Documentation |
This function calculates the posterior probability of each active treatment arm better than control using betabinomial model
ibetabinomial.post(n, y, pi.star = 0.5, pess = 2)
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 |
A vector posterior probability of each active treatment arm better than control
Ziyan Wang
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