ci_fixed: Determine confidence intervals in a single-stage single-arm...

Description Usage Arguments Details Value See Also Examples

View source: R/ci_fixed.R

Description

Determines all possible confidence intervals at the end of a single-stage single-arm trial for a single binary endpoint, as determined using des_fixed(). Support is available to compute confidence intervals using the Agresti-Coull, Clopper-Pearson, Jeffreys, Mid-p, Wald, and Wilson Score approaches.

Usage

1
2
ci_fixed(des, pi, alpha = des$alpha, method = c("agresti_coull",
  "clopper_pearson", "jeffreys", "mid_p", "wald", "wilson"), summary = F)

Arguments

des

An object of class "sa_des_fixed", as returned by des_fixed().

pi

A vector of response probabilities to evaluate the expected performance of the confidence interval calculation procedure at. This will internally default to be the π0 and π1 from des if it is left unspecified.

alpha α

-level to use in confidence interval construction. Defaults to the value of α used in the construction of des (i.e., des$alpha).

method

A vector of methods to use to construct p-values. Currently, support is available to use the Agresti-Coull ("agresti_coull"), Clopper-Pearson ("clopper_pearson"), Jeffreys ("jeffreys"), Mid-p ("mid_p"), Wald ("wald"), and Wilson Score ("wilson") approaches to confidence interval determination.

summary

A logical variable indicating whether a summary of the function's progress should be printed to the console.

Details

In addition, the performance of the chosen confidence interval determination procedures (including their coverage and expected length) for each value of pi in the supplied vector pi, will also be evaluated.

Value

A list of class "sa_ci_fixed" containing the following elements

See Also

des_fixed, opchar_fixed, est_fixed, pval_fixed, and their associated plot family of functions.

Examples

1
2
3
4
5
# Find the optimal single-stage design for the default parameters
des <- des_fixed()
# Determine the performance of all supported confidence interval
# determination procedures for a range of possible response probabilities
ci  <- ci_fixed(des, pi = seq(0, 1, 0.01))

mjg211/singlearm documentation built on May 8, 2021, 3:17 a.m.