plot.multiarm_des_ss_bern: Plot operating characteristics of a single-stage multi-arm...

View source: R/plot.multiarm_des_ss_bern.R

plot.multiarm_des_ss_bernR Documentation

Plot operating characteristics of a single-stage multi-arm clinical trial for a Bernoulli distributed primary outcome

Description

plot.multiarm_des_ss_bern() produces power curve plots for a specified single-stage multi-arm clinical trial design assuming the primary outcome is Bernoulli distributed.

Usage

## S3 method for class 'multiarm_des_ss_bern'
plot(
  x = des_ss_bern(),
  delta_min = -x$pi0 + 1e-06,
  delta_max = 1 - x$pi0 - 1e-06,
  delta = x$delta1 - x$delta0,
  density = 100,
  output = FALSE,
  print_plots = TRUE,
  summary = FALSE,
  ...
)

Arguments

x

A list of class "multiarm_des_ss_bern", as returned by build_ss_bern or des_ss_bern (i.e., a single-stage multi-arm clinical trial design for a Bernoulli distributed outcome). Defaults to des_ss_bern().

delta_min

A numeric specifying the chosen minimum value for the treatment effects to include on the produced plots. Defaults to -x$pi0 + 1e-6.

delta_max

A numeric specifying the chosen maximum value for the treatment effects to include on the produced plots. Defaults to 1 - x$pi0 - 1e-6.

delta

A numeric specifying the chosen treatment effect shift to use in the 'shifted treatment effects plot'. Defaults to x$delta1 - x$delta0.

density

A numeric variable indicating the number of treatment effect scenarios to consider for each power curve. Increasing density increases the smoothness of the produced plots, at the cost of increased run time. Defaults to 100.

output

A logical variable indicating whether the available outputs from the function (see below) should be returned. Defaults to FALSE.

print_plots

A logical variable indicating whether to print produced plots. Defaults to TRUE.

summary

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

...

Not currently used.

Value

If output = T, a list containing the following elements

  • A list in the slot $plots containing the produced plots.

  • Each of the input variables.

See Also

build_ss_bern, des_ss_bern, gui, opchar_ss_bern, sim_ss_bern.

Examples

## Not run: 
# The design for the default parameters
des        <- des_ss_bern()
plot(des)
# An A-optimal design, returning the avaiable outputs from
# plot.multiarm_des_ss_bern()
des_A      <- des_ss_bern(ratio = "A")
plots      <- plot(des_A, output = T)
# Using the root-K allocation rule, modifying the desired type of power, and
# choosing an alternative multiple comparison correction
des_root_K <- des_ss_bern(ratio      = rep(1/sqrt(2), 2),
                          correction = "holm_bonferroni",
                          power      = "disjunctive")
plot(des_root_K)

## End(Not run)

mjg211/multiarm documentation built on Jan. 19, 2024, 8:21 a.m.