optim_duration: Numerical optimization of total study duration

View source: R/optim_duration.R

optim_durationR Documentation

Numerical optimization of total study duration

Description

Optimizes total study duration for a fixed accrual time. Hence, it returns optimal follow-up time after the last patient is enrolled for a fixed sample size. Thus, the function can be used to investigate follow-up variation by varying of baseline hazard, HR, or other quantities used for sample size calculation according to the exponential model given by Lachin et al (1986) (see package gsDesign).

Usage

optim_duration(
  tot_dur,
  accr_time = 24,
  h_c = 0.05/12,
  HR = 0.775,
  uni_dim = TRUE
)

Arguments

tot_dur

- scalar. Total study duration (accrual time + follow-up time) in months.

accr_time

- scalar. Accrual time in months.

h_c

- scalar. Value of hazard rate in control arm.

HR

- scalar. Hazard ratio.

uni_dim

- logical. Is optimization problem unidimansional ? Default and only current possibility is TRUE and uses 'optimize'. If FALSE the routine will still work using 'optimx' and this alternative allows for development of multidimensinoal optimization (see Discussion of accompanying HTML vignette)

Details

This optimization approach takes inspiration from the methods of Rubinstein et al (1981) and George & Desu (1974) as referenced in the accompanying HTML vignette (see folder 'out')

Value

list of optimal duration and updated Nr. of required failures


bonorico/PSI_Wed_Challenge_February documentation built on March 30, 2022, 4 p.m.