bintest: Single-stage designs

View source: R/stat.R

bintestR Documentation

Single-stage designs

Description

Function for sample sizes for single-stage designs in early clinical trial phases (generally phases I and II) based on exact binomial method.

Cycles through possible designs constrained by alpha, beta, and n.max arguments for specified ranges of p0 and p1.

Usage

bintest(
  p0low,
  p1low,
  p0high = p0low,
  p1high = p1low,
  n.max,
  r = n.max,
  alpha = 0.1,
  beta = 0.1
)

Arguments

p0low, p0high

low and high values for p0

p1low, p1high

low and high values for p1

n.max

maximum sample size allowed (or feasible)

r

cut-off value for responses expected; usually best to leave r = n.max (default); useful if the maximum number of responses that may occur is known

alpha, beta

type-I and type-II errors

Value

A list with the following elements:

$designs

a matrix with a row giving a summary of each design which meets the criteria. The columns are: p0 and p1, the null and alternative hypotheses, respectively; n and r2, the overall sample size and minimum number of responses required to reject p0; type1 and power, the alpha and 1 - beta for the designs; and signal, the magnitude of difference between p0 and p1

$call

the call to bintest

$description

help text for $designs

References

Khan, Sarker, Hackshaw. Smaller sample sizes for phase II trials based on exact tests with actual error rates by trading-off their nominal levels of significance and power. British J of Cancer (2012) 107, 1801-9.

See Also

ph2single; bin1samp; bintest, SAS macro

Examples

bintest(0.2, 0.5, n.max = 25)
## compare
rawr:::bin1samp(0.2, 0.5)

## example in sas macro
bintest(0.1, 0.2, 0.15, 0.2, n.max = 80, alpha = 0.08, beta = 0.24)


raredd/rawr documentation built on May 19, 2024, 1:02 p.m.