OneStageSS: OneStageSS

View source: R/OneStageSS.r

OneStageSSR Documentation

OneStageSS

Description

Calculates sample size or power for single-stage trials with a binary endpoint according to: Ahern, R. P., Sample size tables for exact single-stage phase II designs. Statistics in medicine 20.6 (2001): 859-866.

Usage

OneStageSS(p0, p1, power = 0.8, n = NA, alpha = 0.05, nstart = 1)

Arguments

p0

Proportion of events under H0

p1

Proportion of events under H1

power

Power, default=0.8

n

Sample size, calculated if NA, otherwise power is calculated

alpha

Alpha, default=0.05

nstart

Number of patients to start iterations, default=1, can be increased to save time

Value

List with number of patients with events for a significant trial (r), number of patients (n), alpha and power.

Examples

# Calculate sample size
OneStageSS(p0=0.5,p1=0.6,alpha=0.05,power=0.8)
# Calculate power
OneStageSS(p0=0.5,p1=0.6,alpha=0.05,n=100)


CTU-Bern/CTUtemplate documentation built on Feb. 27, 2025, 7:21 p.m.