opt_design: Optimize a Basket Trial Design

View source: R/opt_design.R

opt_designR Documentation

Optimize a Basket Trial Design

Description

Functions for optimizing the tuning parameters of a basket trial design. This defaults to the function basksim::opt_design.

Usage

opt_design(design, ...)

## Default S3 method:
opt_design(design, ...)

Arguments

design

An object created with one of the setup functions from the basksim package.

...

Further arguments.

Value

A matrix with the expected number of correct decisions.

Examples


design <- setup_fujikawa_x(k = 3, p0 = 0.2)
# In an actual application, usually increase to at least iter = 1000.
opt_design(design = design,
           n = 20, alpha = 0.05,
           design_params = list(epsilon = c(1, 2), tau = c(0, 0.5)),
           scenarios = get_scenarios(design, 0.5),
           prec_digits = 3,
           iter = 100)


baskwrap documentation built on March 19, 2026, 5:09 p.m.