Learn R Programming

RARtrials (version 0.0.2)

pgreater_beta: Calculate the Futility Stopping Probability for Binary Endpoint with Beta Distribution

Description

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

Usage

pgreater_beta(a1, b1, a2, b2, delta, side, ...)

Value

a posterior probability of \(Pr(p_k>p_{{\sf control}}+\delta|{\sf data})\) with side equals to 'upper'; a posterior probability of \(Pr(p_{{\sf control}}>p_k+\delta|{\sf data})\) with side equals to 'lower'.

Arguments

a1, b1

\(\alpha\) and \(\beta\) in \(Beta(\alpha,\beta)\), current estimated \(\alpha\) for the control group.

a2, b2

\(\alpha\) and \(\beta\) in \(Beta(\alpha,\beta)\), current estimated \(\alpha\) for the treatment group which is compared to the control group.

delta

expected difference in success probabilities between the control group and the treatment group.

side

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

...

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

Details

This function calculates the results of \(Pr(p_k>p_{{\sf control}}+\delta|{\sf data})\) for side equals to 'upper' and the results of \(Pr(p_{{\sf control}}>p_k+\delta|{\sf data})\) for side equals to 'lower'. The result indicates the posterior probability of stopping a treatment group due to futility around \(1\%\) in Bayesian response-adaptive randomization with a control arm using Thall \(\&\) Wathen method, with accumulated results during the conduct of trials.

References

Wathen2017RARtrials

Examples

Run this code
pgreater_beta(a1=8, b1=10,a2=5, b2=19, delta=0.1, side='upper')
pgreater_beta(a1=65, b1=79,a2=58, b2=68, delta=0, side='lower')

Run the code above in your browser using DataLab