twostg_text | R Documentation |
Output two-stage design text.
twostg_text(p0, pa, n1, n2, r1, r2, conf = NULL, outcome = "_OUTCOME_ (_OUT_)")
p0 , pa |
the null and alternative hypotheses |
n1 , n2 |
sample size of first and second stage |
r1 , r2 |
maximum number of responses in first stage and overall where treatment is declared ineffective |
conf |
confidence level for single- and two-stage confidence intervals |
outcome |
text string describing the outcome; if a string such as
|
A character string describing the two-stage design with
attr(., "design")
containing the design.
twostg_power
; simon
;
twostg
; twocon
;
binci
Other designs:
b2p_text()
,
bin1samp_text()
,
mtd_text()
,
simon_text()
## basic usage (compare to a simon design)
p0 <- 0.3
pa <- 0.5
s <- as.list(desmon2:::simon(p0, pa)$designs[1L, ])
twostg_text(p0, pa, s$n1, s$n2, s$r1, s$r2)
## Not run:
## use cat and/or strwrap for improved formatting and writing
cat(strwrap(twostg_text(p0, pa, s$n1, s$n2, s$r1, s$r2), width = 80),
sep = '\n')
cat(twostg_text(p0, pa, s$n1, s$n2, s$r1, s$r2),
file = '~/simon_design.txt')
cat(twostg_text(p0, pa, s$n1, s$n2, s$r1, s$r2,
outcome = 'overall response (OR) rate'),
file = '~/simon_design2.txt')
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.