get.optimal_2arm_piecewise {DTEBOP2}R Documentation

Obtain Optimal Design Parameters for DTE-BOP2 Design

Description

Computes the optimal tuning parameters \lambda and \gamma for use in posterior decision rules of two-arm, multi-stage survival trials under a piecewise exponential model with delayed treatment effect. These parameters are selected to control the type I error and maximize power, given user-specified interim sample sizes, prior distribution for the delayed separation timepoint, and hypothesized median survival times.

Usage

get.optimal_2arm_piecewise(
  median.1,
  median.2,
  gprior.E_1 = NULL,
  gprior.E_2 = NULL,
  L,
  U,
  S_likely = (L + U)/2,
  lambda.seq = seq(0.5, 0.975, by = 0.025),
  gamma.seq = seq(0, 1, by = 0.1),
  trunc.para,
  Uniform = FALSE,
  err1,
  nsim,
  n.interim,
  rate,
  FUP,
  track = TRUE,
  control = FALSE,
  control.point = NULL
)

Arguments

median.1

Numeric. The overall median survival time for the standard-of-care (SOC) arm under the null hypothesis.

median.2

Numeric. The overall median survival time for the experimental arm under the alternative hypothesis.

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.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.1)

L

Numeric. The lower bound of the delayed treatment effect (DTE) separation timepoint.

U

Numeric. The upper bound of the delayed treatment effect (DTE) separation timepoint.

S_likely

Numeric. The most likely value of the DTE separation timepoint. Defaults to the midpoint of L and U.

lambda.seq

A vector. The sequence of \lambda in 1-\lambda(n/N)^{\gamma}

gamma.seq

A vector. The sequence of \gamma in 1-\lambda(n/N)^{\gamma}

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.

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].

err1

Type I error rate.

nsim

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

n.interim

A vector of sample sizes per arm at each interim analysis.

  • Each element except the last represents an interim sample size per arm.

  • The final element is the total sample size N per arm.

rate

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

FUP

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

track

Logical value. If true, it will report the current lambda value in the running simulations.

control

Logical value. If TRUE, the type I error will be additionally controlled at control point. Default is FALSE.

control.point

Vector. It specifies the points where the type I error is controlled.

Value

A list with the following components:

optimal

A numeric vector of length four. Contains the optimal values of \lambda and \gamma, along with the average type I error and average power achieved under these tuning parameters.

oc.mat

A numeric matrix containing all evaluated combinations of \lambda and \gamma that satisfy the type I error constraint. Each row includes values for \lambda, \gamma, average type I error, and average power.

Examples

# Define design and simulation parameters
median.1 <- 6
median.2 <- 10
L <- 2.6
U <- 3.4
S_likely <- 2.7
trunc.para <- c(1, 1)
rate <- 3
FUP <- 9
err1 <- 0.15
n.interim <- c(30, 50)  # Each arm has 30 patients at interim and 50 at final

get.optimal_2arm_piecewise(
  median.1 = median.1,
  median.2 = median.2,
  L = L,
  U = U,
  Uniform = FALSE,
  S_likely = S_likely,
  trunc.para = trunc.para,
  err1 = err1,
  n.interim = n.interim,
  rate = rate,
  FUP = FUP,
  track = TRUE,
  nsim = 10000
)


[Package DTEBOP2 version 1.0.3 Index]