simonBayesSim {lrstat}R Documentation

Simulation of Simon's Bayesian basket trials

Description

Obtains the simulated raw and summary data for Simon's Bayesian basket discovery trials.

Usage

simonBayesSim(
  p = NA_real_,
  accrualTime = 0L,
  accrualIntensity = NA_real_,
  stratumFraction = 1L,
  lambda = NA_real_,
  gamma = NA_real_,
  phi = NA_real_,
  plo = NA_real_,
  T = NA_real_,
  maxSubjects = NA_integer_,
  plannedSubjects = NA_integer_,
  maxNumberOfIterations = 1000L,
  maxNumberOfRawDatasets = 1L,
  seed = NA_integer_
)

Arguments

p

The vector of true response probabilities across strata.

accrualTime

A vector that specifies the starting time of piecewise Poisson enrollment time intervals. Must start with 0, e.g., c(0, 3) breaks the time axis into 2 accrual intervals: [0, 3) and [3, Inf).

accrualIntensity

A vector of accrual intensities. One for each accrual time interval.

stratumFraction

A vector of stratum fractions that sum to 1. Defaults to 1 for no stratification.

lambda

The prior probability that the drug activity is homogeneous across strata.

gamma

The prior probability that the drug is active in a stratum.

phi

The response probability for an active drug.

plo

The response probability for an inactive drug.

T

The threshold for a conclusive posterior probability to stop enrollment.

maxSubjects

The maximum total sample size.

plannedSubjects

The planned cumulative number of subjects at each stage.

maxNumberOfIterations

The number of simulation iterations. Defaults to 1000.

maxNumberOfRawDatasets

The number of raw datasets to extract.

seed

The seed to reproduce the simulation results. The seed from the environment will be used if left unspecified,

Value

A list containing the following four components:

Author(s)

Kaifeng Lu, kaifenglu@gmail.com

Examples


sim1 = simonBayesSim(
  p = c(0.25, 0.25, 0.05),
  accrualIntensity = 5,
  stratumFraction = c(1/3, 1/3, 1/3),
  lambda = 0.33, gamma = 0.5,
  phi = 0.25, plo = 0.05,
  T = 0.8, maxSubjects = 50,
  plannedSubjects = seq(5, 50, 5),
  maxNumberOfIterations = 1000,
  maxNumberOfRawDatasets = 1,
  seed = 314159)

sim1$overview


[Package lrstat version 0.2.9 Index]