getoc_2arm_piecewise {DTEBOP2}R Documentation

Compute Operating Characteristics for Two-Arm Piecewise Exponential Designs

Description

Computes the operating characteristics (e.g., type I error, power, and other performance metrics) of a two-arm survival trial design under the DTE-BOP2 framework with delayed treatment effect, based on a piecewise exponential model. This function is typically used after selecting design parameters (e.g., lambda, gamma) to assess the statistical properties of the proposed design.

Usage

getoc_2arm_piecewise(
  median.true,
  gprior.E_1 = NULL,
  gprior.E_2 = NULL,
  lambda,
  gamma,
  n.interim,
  L,
  U,
  S_likely = (L + U)/2,
  Uniform = FALSE,
  trunc.para,
  rate,
  FUP = 6,
  nsim = 1000,
  track = FALSE,
  seed = NULL
)

Arguments

median.true

A numeric vector of length two.

  • The first element is the overall median survival time (in months) for the standard-of-care (SOC) arm under the null hypothesis.

  • The second element is the overall median survival time for the experimental arm.

gprior.E_1

Optional. A numeric vector of length two specifying the shape and scale parameters of the inverse-gamma prior for the pre-separation mean survival time (i.e., 1/hazard rate). If NULL, the default is c(4,3/log(2)*median.true[1])

gprior.E_2

Optional. A numeric vector of length two specifying the shape and scale parameters of the inverse-gamma prior for the post-separation mean survival time (i.e., 1/hazard rate). If NULL, the default is c(4,6/log(2)*median.true[1])

lambda

Numeric. The tuning parameter \lambda in the decision boundary function 1 - \lambda \cdot (n/N)^\gamma.

gamma

Numeric. The tuning parameter \gamma in the decision boundary function 1 - \lambda \cdot (n/N)^\gamma.

n.interim

A numeric vector. Specifies the sample sizes per arm at each analysis. The last element represents the final sample size per arm.

L

Numeric. Lower bound of the delayed treatment effect (DTE) separation time.

U

Numeric. Upper bound of the DTE separation time.

S_likely

Numeric. The most likely value of the separation time. Defaults to the midpoint of L and U. Default is the midpoint of L and U.

Uniform

Logical value.

  • Default FALSE. The truncated gamma distribution for the separation time will be utilized.

  • If TRUE the average type I error and power are calculated based on 20 evenly divided points in the interval [L,U].

trunc.para

Vector value with two elements. The first element is the shape parameter for the truncated gamma prior and the second one is the scale parameter.

rate

Numeric. Patient accrual rate (e.g., patients per month).

FUP

Numeric value. Duration of follow-up. Default is 6 month/year in the context.

nsim

Integer. Number of simulations to generate. Default is 10000.

track

Logical value.

  • Default FALSE

  • If TRUE, prints progress updates every 1000 simulations.

seed

Optional integer. If provided, sets the seed for reproducibility.

Value

A list with the following components:

earlystop

Numeric. The proportion of simulated trials that stopped early due to futility or predefined stopping rules.

reject

Numeric. The proportion of trials in which the null hypothesis ($H_0$) was rejected.

average.patients

Numeric. The average number of patients enrolled across all simulated trials.

trial.duration

Numeric. The average total duration of the trial (in months), including follow-up.

Examples

# Define trial parameters
median.1 <- 6
median.2 <- 9
trunc.para <- c(1, 1)
rate <- 3
FUP <- 9
n.interim <- c(30, 50)  # Each arm: 30 pts at interim, 50 pts at final
# Run operating characteristics computation
getoc_2arm_piecewise(median.true = c(median.1, median.2),
Uniform = FALSE,lambda = 0.9,gamma = 1,n.interim = n.interim,
  L = 3,U = 3,S_likely = 3,FUP = FUP,trunc.para = trunc.para,
  rate = rate,nsim = 1)

[Package DTEBOP2 version 1.0.3 Index]