Learn R Programming

basksim (version 2.0.2)

get_details.app: Get Details of a Basket Trial Simulation with the Adaptive Power Prior Design for sequential clinical trials

Description

Get Details of a Basket Trial Simulation with the Adaptive Power Prior Design for sequential clinical trials

Usage

# S3 method for app
get_details(
  design,
  n,
  p1 = NULL,
  lambda,
  level = 0.95,
  iter = 1000,
  data = NULL,
  ...
)

Value

A list containing the rejection probabilities, posterior means, mean squared errors and mean limits of HDI intervals for all baskets as well as the family-wise error rate.

Arguments

design

An object of class app.

n

The sample sizes of the baskets. A vector must be used for varying sample sizes.

p1

Probabilities used for the simulation. If NULL then all probabilities are set to p0.

lambda

The posterior probability threshold.

level

Level of the credibility intervals.

iter

The number of iterations in the simulation. Is ignored if data is specified.

data

A data matrix with k column with the number of responses for each basket. Has to be generated with get_data. If data is used, then iter is ignored.

...

Further arguments.

Examples

Run this code
design <- setup_app(k = 3, p0 = 0.2)

# Equal sample sizes
get_details(design = design, n = 20, p1 = c(0.2, 0.5, 0.5),
 lambda = 0.95, iter = 100)

# Unequal sample sizes
get_details(design = design, n = c(15, 20, 25), p1 = c(0.2, 0.5, 0.5),
 lambda = 0.95, iter = 100)

Run the code above in your browser using DataLab