binom_one_alpha: Single arm, exact p-value calculator for single or...

Description Usage Arguments See Also Examples

View source: R/binom_one_alpha_v1.0.R

Description

P-value (alpha) for single arm binomial clinical trials. This is done exactly accounting for all interim analysis prior to stopping the trial.

Usage

1
binom_one_alpha(result.success, result.n, p0, failure, success, n)

Arguments

result.success

total successes at the end of the trial

result.n

total patients at the end of the trial

p0

Probability of success under H0

failure

A vector of the number of failures required to stop for futility, if not able to stop NA or a character string should be provided

success

A vector of the number of successes required to stop for efficacy, if not able to stop NA or a character string should be provided

n

A vector of the total number of patients to recruit up to each stage of the trial

See Also

binom_one_power, binom_one_assurance

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# Simon's two stage design
failure=c(0,3)
success=c(NA,4)
n=c(7,18)
p0=0.1

result.success=4
result.n=18

# without accounting for interim analysis when calculating 
# the p-value
1-pbinom(result.success-1,result.n,p0)
# account for interim analysis
binom_one_alpha(result.success,result.n,p0,failure,success,n)

EurosarcBayes documentation built on Nov. 17, 2017, 7:03 a.m.