binom_one_power {EurosarcBayes}R Documentation

Single arm, power calculator for single or multi-stage binomial trials.

Description

Computes the power of a given trial design given the probability of success of treatment p.

Usage

binom_one_power(p,failure,success,n)

plot_binom_one_power(failure, success, n, ndivisions=1000, 
	xlim=c(0,1), xaxs="i", yaxs="i", ylim=c(0,1.1),
	main="Power curve for a single arm binomial trial design",
	xlab="Probability of successful treatment",
	ylab="Probability of successful trial", 
	p=NULL, alpha=NULL, power=NULL, col.error="red", ...)

Arguments

p

Probability of success to compute power for

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

ndivisions

The number of points calculated for the plot

col.error

Colour of type II errors in the plot

alpha, power

Plotted as lines if provided

xlim, ylim, xaxs, yaxs, main, xlab, ylab

Different defaults for plotting parameters

...

Additional plotting parameters to pass to plot function

See Also

binom_one_alpha, binom_one_assurance

Examples

# Simon's two stage design
failure=c(0,3)
success=c(NA,4)
n=c(7,18)
p0=0.1
p1=0.3

# power
binom_one_power(p1,failure,success,n)
# type 1 error (alpha)
binom_one_power(p0,failure,success,n)

# plot
plot_binom_one_power(failure,success,n,ndivisions=1000,p=c(p0,p1),
 alpha=0.1,power=0.8)

[Package EurosarcBayes version 1.1 Index]