opchar_bayesfreq: Determine the operating characteristics of...

Description Usage Arguments Details Value See Also Examples

View source: R/opchar_bayesfreq.R

Description

opchar_bayesfreq() supports the simultaneous evaluation of the operating characteristics of multiple Bayesian-frequentist single-arm clinical trial designs for a single binary primary endpoint, determined using des_bayesfreq().

Usage

1
opchar_bayesfreq(des, ..., k, mu, nu, pi, summary = F)

Arguments

des

An object of class "sa_des_bayesfreq", as returned by des_bayesfreq().

...

Additional objects of class "sa_des_bayesfreq". These will be grouped in to a list named "add_des".

k

Calculations are performed conditional on the trial stopping in one of the stages listed in vector k. Thus, k should be a vector of integers, with elements between one and the maximal number of possible stages in the supplied designs. If left unspecified, it will internally default to all possible stages.

mu

A vector of the first Beta shape parameters to evaluate operating characteristics at. This will internally default to be the μ from the supplied designs if it left unspecified.

nu

A vector of the second Beta shape parameters to evaluate operating characteristics at. This will internally default to be the ν from the supplied designs if it left unspecified.

pi

A vector of response probabilities to evaluate operating characteristics at. This will internally default to be the π0 and π1 from the supplied designs if it is left unspecified.

summary

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

Details

Note that each of the supplied designs must have been designed for the same values of μ, ν, and π0.

For each value of mu, nu, and pi in the supplied vectors mu, nu, and pi, opchar_bayesfreq() evaluates the Bayesian and frequentist power, ESS, and other key characteristics, of each of the supplied designs.

Calculations are performed conditional on the trial stopping in one of the stages specified using the input (vector) k.

Value

A list of class "sa_opchar_bayesfreq" containing the following elements

See Also

des_bayesfreq, and their associated plot family of functions.

Examples

1
2
3
4
5
6
7
# Find the optimal two-stage Bayesian-frequentist design for the default
# parameters
des    <- des_bayesfreq()
# Determine operating characteristics for a range of mu, nu, and pi
opchar <- opchar_bayesfreq(des, mu = seq(0.05, 0.2, length.out = 10),
                           nu = seq(0.45, 1.8, length.out = 100),
                           pi = seq(0, 1, by = 0.01))

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