twostg.test: Two-stage trials

View source: R/stat.R

twostg.testR Documentation

Two-stage trials

Description

Calculate confidence intervals, estimators, and p-value from a two-stage trial.

Usage

twostg.test(r, r1, n1, n2, p0 = NULL, conf = 0.95, dp = 1)

Arguments

r, r1

total observed responses and maximum number of responses in first stage to declare treatment inactive

n1, n2

sample size of the first and second stage

p0

(optional) null hypothesis

conf

confidence level

dp

affects the ordering of outcomes within the sample space, see twocon

See Also

twocon; twostage.inference

Examples

rawr:::simon(0.1, 0.3)

# $designs$`p0 = 0.1, pa = 0.3`
#      n1 r1 n2 r2 Pstop1.H0       size      type2 E.tot.n.H0
# [1,] 12  1 23  5 0.6590023 0.09771828 0.09855051   19.84295
#
# ...
#
# $description
# [1] "n1, n2 = cases 1st stage and additional # in 2nd"
# [2] "r1, r2 = max # responses 1st stage and total to declare trt inactive"

twostg.test(5, 1, 12, 23)
twostg.test(5, 1, 12, 23, 0.1)
twostg.test(8, 1, 12, 23, 0.1)$p.value


raredd/rawr documentation built on April 29, 2024, 10:29 a.m.