des_bayesfreq: Design a Bayesian-frequentist single-arm trial for a single...

Description Usage Arguments Details Value See Also Examples

View source: R/des_bayesfreq.R

Description

Determines optimised single- and two-stage Bayesian-frequentst single-arm clinical trial designs for a single binary primary endpoint, using exact calculations.

Usage

1
2
3
4
des_bayesfreq(J = 2, pi0 = 0.1, pi1 = 0.3, alpha = 0.05,
  beta = 0.2, mu = 0.1, nu = 0.9, Nmin = 1, Nmax = 30,
  optimality = "ess", control = c("frequentist", "bayesian"),
  equal_n = F, PL = 0.5, PU = 0.9, PT = 0.95, summary = F)

Arguments

J

The maximal number of stages to allow.

pi0

The (undesirable) response probability used in the definition of the null hypothesis.

pi1

The (desiable) response probability used in the definition of the alternative hypothesis.

alpha

The desired maximal type-I error-rate.

beta

The desired maximal type-II error-rate.

mu

The first shape parameter of the Beta distribution.

nu

The second shape parameter of the Beta distribution.

Nmin

The minimal total sample size to allow in considered designs.

Nmax

The maximal total sample size to allow in considered designs.

optimality

Choice of optimal design criteria. Must be one of "ess" or "minimax".

control

Error-rates to control. Should be a vector containing elements chosen from "frequentist" and "bayesian".

equal_n

A logical variable indicating that the sample size of each stage should be equal.

PL

Predictive probability value used in determining when to stop the trial early for futility.

PU

Predictive probability value used in determining when to stop the trial early for efficacy.

PT

Terminal predictie probability value used in determining when the trial is a success.

summary

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

Details

Designs controlling Bayesian, frequentist, or Bayesian and frequentist operating characteristics can be determining, which optimise either the Bayesian expected sample size or the maximal sample size.

Value

A list of class "sa_des_bayesfreq" containing the following elements

See Also

opchar_bayesfreq, and their associated plot family of functions.

Examples

1
2
3
4
# The ESS-optimal design for the default parameters
ess_optimal <- des_bayesfreq()
# The corresponding minimax design
minimax     <- des_bayesfreq(optimality = "minimax")

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