bin1samp_text: One-sample design text

View source: R/stat_text.R

bin1samp_textR Documentation

One-sample design text

Description

Output one-sided, one-sample, single-stage exact binomial design text.

Usage

bin1samp_text(
  p0,
  pa,
  alpha = 0.1,
  beta = 0.1,
  n.min = 20L,
  conf = NULL,
  outcome = "_OUTCOME_ (_OUT_)"
)

Arguments

p0, pa

the null and alternative hypotheses

alpha, beta, n.min

the target type-I and type-II errors and minimum sample size considered, passed to bin1samp

conf

confidence level for confidence intervals

outcome

text string describing the outcome; if a string such as "long description (abbr)" is given, then entire string is used in the first instance, and only the text in parens is used subsequently

Value

A character string describing the design with attr(, "design") containing the design.

See Also

bin1samp; binci

Other designs: b2p_text(), mtd_text(), simon_text(), twostg_text()

Examples

## basic usage
p0 <- 0.3
pa <- 0.5
bin1samp_text(p0, pa)

## Not run: 
## use cat and/or strwrap for improved formatting and writing
cat(strwrap(bin1samp_text(p0, pa), width = 80), sep = '\n')

cat(bin1samp_text(p0, pa), file = '~/bin1samp_design.txt')

cat(bin1samp_text(p0, pa, outcome = 'overall response (OR) rate'),
    file = '~/bin1samp_design2.txt')

## End(Not run)


raredd/desmon2 documentation built on Feb. 9, 2023, 12:09 p.m.