Learn R Programming

confidenceSim (version 0.1.0)

getBoundsFromConfidence: Get Critical Bounds from Confidence Thresholds

Description

Derive traditional frequentist critical values from frequentist confidence thresholds for confidence in treatment benefit.

Usage

getBoundsFromConfidence(
  num.treat.arms = 2,
  conf.lower = 0.01,
  conf.upper = 0.99,
  p.sided = 1
)

Value

List of values:

  • conf.lower: confidence in treatment benefit lower bound

  • z.score.lower: critical value corresponding to lower confidence bound

  • p.value.lower: p-value correponding to lower confidence bound

  • conf.upper: confidence in treatment benefit upper bound

  • z.score.upper: critical value corresponding to upper confidence bound

  • p.value.upper: p-value corresponding to upper confidence bound

  • p.value: sidedness of test

Arguments

num.treat.arms

Number of treatment arms (excludes control). Default is 2.

conf.lower

Confidence in treatment benefit boundary for inferiority i.e. stop for inferiority if confidence in benefit is below this. Default is 0.01.

conf.upper

Confidence in treatment benefit boundary for efficacy i.e. stop for efficacy if confidence in benefit is above this. Default is 0.99.

p.sided

Sidedness of statistical test, 1 (one-sided) and 2 (two-sided). Default is 1.

Details

During a confidence trial, efficacy and inferiority is determined by the level of confidence in treatment benefit. Efficacy is declared if this confidence level exceeds a pre-specified boundary, and inferiority is declared if this confidence levels falls below a second pre-specified valye. Given confidence-based thresholds for efficacy and inferiority, and the sidedness of the test, this function returns the traditional frequentist p-value.

Examples

Run this code
# Running the function on default values
bounds <- getBoundsFromConfidence()

# to make adjustments for multiple arms
bounds <- getBoundsFromConfidence(num.treat.arms = 3)

Run the code above in your browser using DataLab