des_one_stage: Design a one-stage two-arm randomised clinical trial assuming...

Description Usage Arguments Value See Also Examples

View source: R/des_one_stage.R

Description

des_one_stage determines one-stage two-arm randomised clinical trial designs, assuming the primary outcome variable is Bernoulli distributed. It supports a flexible framework for specifying which scenarios to control the type-I and type-II error-rates for, and allows for design determination assuming a variety of test statistics. In all instances, des_one_stage computes the optimal required sample size in each arm, the associated optimal stopping boundaries, and returns information on key operating characteristics.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
des_one_stage(
  type = "binomial",
  alpha = 0.1,
  beta = 0.2,
  delta = 0.2,
  ratio = 1,
  Pi0 = 0.1,
  Pi1 = Pi0[1],
  nCmax = 50L,
  summary = FALSE
)

Arguments

type

A character string indicating the chosen design framework/test statistic to assume. Must be one of "barnard", "binomial", "fisher", or "sat". Defaults to "binomial".

alpha

A numeric indicating the chosen value for α, the significance level (i.e., the type-I error-rate). Defaults to 0.1.

beta

A numeric indicating the chosen value for β, used in the definition of the desired power (i.e., the type-II error-rate). Defaults to 0.2.

delta

A numeric indicating the chosen value for δ, the treatment effect assumed in the power calculation. Defaults to 0.2.

ratio

A numeric indicating the chosen value for r, the allocation ratio to the experimental arm, relative to the control arm. Defaults to 1.

Pi0

A numeric vector indicating the chosen value for Π0, the control arm response rates to control the type-I error-rate to level α for. Must either be of length one, indicating a single point, or of length two. In this case, the elements indicate the range of possible response rates to allow for. Defaults to 0.1.

Pi1

A numeric vector indicating the chosen value for Π1, the control arm response rates to allow for in the power calculations. Must either be of length one, indicating a single point, or of length two. In this case, the elements indicate the range of possible response rates to allow for. Defaults to Pi0[1].

nCmax

A numeric indicating the maximum value of the sample size in the control arm to consider in the search procedure. Defaults to 50L.

summary

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

Value

A list with additional class "ph2rand_des", containing each of the input parameters along with several additional variables, including

See Also

des_two_stage, opchar, pmf, sim, terminal, plot.ph2rand_des, summary.ph2rand_des.

Examples

1
2
3
4
5
6
# The design for the default parameters
des       <- des_one_stage()
# Controlling the type-I/II error-rates over a range of possible response
# rates
des_range <- des_one_stage(Pi0 = c(0, 1),
                           Pi1 = c(0, 0.8))

ph2rand documentation built on March 3, 2021, 1:11 a.m.