pmax_beta {RARtrials}R Documentation

Posterior Probability that a Particular Arm is the Best for Binary Endpoint

Description

Calculate posterior probability that a particular arm is the best in a trial using Bayesian response-adaptive randomization with a control group (the Thall \& Wathen method). The conjugate prior distributions follow Beta (Beta(\alpha,\beta)) distributions for binary outcomes in each arm and can be specified individually.

Usage

pmax_beta(
  armn,
  a1 = NULL,
  b1 = NULL,
  a2 = NULL,
  b2 = NULL,
  a3 = NULL,
  b3 = NULL,
  a4 = NULL,
  b4 = NULL,
  a5 = NULL,
  b5 = NULL,
  side,
  ...
)

Arguments

armn

number of arms in the trial with values up to 5. When armn=2, only a1 to a2 and b1 to b2 need to be specified. When armn=3, only a1 to a3 and b1 to b3 need to be specified. When armn=4, only a1 to a4 and b1 to b4 need to be specified. When armn=5, a1 to a5 and b1 to b5 need to be specified.

a1, b1

\alpha and \beta in Beta(\alpha,\beta) for the arm to calculate the allocation probability of.

a2, b2

\alpha and \beta in Beta(\alpha,\beta) for one of the remaining arms.

a3, b3

\alpha and \beta in Beta(\alpha,\beta) for one of the remaining arms.

a4, b4

\alpha and \beta in Beta(\alpha,\beta) for one of the remaining arms.

a5, b5

\alpha and \beta in Beta(\alpha,\beta) for one of the remaining arms.

side

direction of a one-sided test, with values 'upper' or 'lower'.

...

additional arguments to be passed to integrate (such as rel.tol) from this function.

Details

This function calculates the results of formula Pr(p_k=max\{p_1,...,p_K\}) for side equals to 'upper' and the results of formula Pr(p_k=min\{p_1,...,p_K\}) for side equals to 'lower'. This function returns the probability that the posterior probability of arm k is maximal or minimal in trials with up to five arms.

Value

a probability that a particular arm is the best in trials up to five arms.

Examples

pmax_beta(armn=5,a1=8,b1=10,a2=5,b2=19,a3=8,b3=21,
a4=6, b4=35, a5=15, b5=4, side='upper')
pmax_beta(armn=4,a1=56,b1=98,a2=25,b2=70,a3=87,b3=107,
a4=106, b4=202, side='lower')
pmax_beta(armn=3,a1=60,b1=46,a2=55,b2=46,a3=35,b3=36,side='upper')

[Package RARtrials version 0.0.1 Index]