Package 'HCTDesign'

Title: Group Sequential Design for Historical Control Trial with Survival Outcome
Description: It provides functions to design historical controlled trials with survival outcome by group sequential method. The options for interim look boundaries are efficacy only, efficacy & futility or futility only. It also provides the function to monitor the trial for any unplanned look. The package is based on Jianrong Wu, Xiaoping Xiong (2016) <doi:10.1002/pst.1756> and Jianrong Wu, Yimei Li (2020) <doi:10.1080/10543406.2019.1684305>.
Authors: Tushar Patni [aut, cre], Yimei Li [aut], Jianrong Wu [aut], Arzu Onar-Thomas [aut]
Maintainer: Tushar Patni <[email protected]>
License: GPL-3
Version: 0.7.2
Built: 2025-02-12 04:26:36 UTC
Source: https://github.com/cran/HCTDesign

Help Index


HCT design with interim monitoring for efficacy only

Description

The group sequential design for historical controlled survival outcome trials with efficacy boundaries only.

Usage

EffDesign(
  k,
  alpha,
  beta,
  delta,
  delta0,
  d1,
  option = "OBF",
  param = 4,
  trial = "Superiority"
)

Arguments

k

vector of time fraction for all planned looks: k=c(1/3,2/3,1) if the three planned looks will be carried out at 1/3, 2/3 and all of the total events in the experiment arm.

alpha

type I error.

beta

type II error.

delta

hazard ratio: hazard of experiment group over hazard of control group.

delta0

Non-inferiority margin.

d1

total number of events in the historical control group.

option

type of spending function: "OBF", "Gamma", "Rho" or "Pocock". Default is "OBF.

param

Parameter for Gamma family or Rho family. Default value is 4.

trial

Type of trial: "Superiority" or "Non-inferiority". Default is "Superiority".

Value

List of dataframes and vectors containing the details about the following: design of the trial which includes the number of looks and events; details about futility and efficacy boundaries which include transformed information time at each look, cumulative beta and alpha respectively, p-values and crossing probabilities; etam(drift parameter); d2max(maximum number of events in the experimental group); delta_used(hazard ratio used in the design).

Author(s)

Tushar Patni, Yimei Li, Jianrong Wu, and Arzu Onar-Thomas.

References

Wu J, Xiong X (2016). “Survival trial design and monitoring using historical controls.” Pharmaceutical Statistics, 15(5), 405-411.

Wu J, Li Y (2020). “Group sequential design for historical control trials using error spending functions.” Journal of Biopharmaceutical Statistics, 30(2), 351-363.

Examples

#Superiority trial with three equally spaced looks for efficacy using OBF spending function.
gg<-EffDesign(k=c(0.3,0.6,1),alpha=0.05,beta=0.1,delta=0.57,d1=65,option="OBF",trial="Superiority")

Monitoring the trial at interim looks for a trial with efficacy monitoring only

Description

Calculates one-sided efficacy boundary values at the observed number of events.

Usage

EffIM(
  d2,
  dmax,
  last.look = FALSE,
  d1,
  etam,
  alpha,
  beta,
  opt = "OBF",
  param = 4
)

Arguments

d2

vector of number of events at which you want to monitor the trial.

dmax

maximum number of events in the experimental group calculated from design function.

last.look

logical which indicates whether the current look is the last look or not. Default is FALSE. If true, the post hoc power is calculated.

d1

total number of events in the historical control group.

etam

value of the drift parameter obtained from design function.

alpha

type I error.

beta

type II error.

opt

type of spending function: "OBF", "Gamma", "Rho" or "Pocock". Default is "OBF".

param

Parameter for "gamma family" or rho family. Default value is 4.

Details

The number of events have to be entered sequentially. See example.

Value

A list containing efficacy boundary values along with the p-values and transformed information time for the current look. Post-hoc power is also calculated in case of early stopping of the trial.

Author(s)

Tushar Patni, Yimei Li, Jianrong Wu, and Arzu Onar-Thomas.

References

Wu J, Xiong X (2016). “Survival trial design and monitoring using historical controls.” Pharmaceutical Statistics, 15(5), 405-411.

Wu J, Li Y (2020). “Group sequential design for historical control trials using error spending functions.” Journal of Biopharmaceutical Statistics, 30(2), 351-363.

Examples

#Interim look for the trial when the number of events is 13(first look).
gg<-EffIM(c(13),dmax=57,alpha=0.05,beta=0.1,etam=3.0726,d1=65,opt="OBF",last.look=FALSE)
#Interim look for the trial when the number of events is 35(second look).
gg<-EffIM(c(13,35),dmax=57,alpha=0.05,beta=0.1,etam=3.0726,d1=65,opt="OBF",last.look=FALSE)

HCT design with interim monitoring for futiity only

Description

The group sequential design for historical controlled survival outcome trials with futility boundaries only.

Usage

FutDesign(
  k,
  alpha,
  beta,
  delta,
  d1,
  option = "OBF",
  param = 4,
  trial = "Superiority",
  delta0
)

Arguments

k

vector of time fraction for all planned looks: k=c(1/3,2/3,1) if the three planned looks will be carried out at 1/3, 2/3 and all of the total events in the experiment arm.

alpha

type I error.

beta

type II error.

delta

hazard ratio: hazard of experiment group over hazard of control group.

d1

total number of events in the historical control group.

option

type of spending function: "OBF", "Gamma", "Rho" or "Pocock". Default is "OBF.

param

Parameter for Gamma family or Rho family. Default value is 4.

trial

Type of trial: "Superiority" or "Non-inferiority". Default is "Superiority".

delta0

Non-inferiority margin.

Value

List of dataframes and vectors containing the details about the following: design of the trial which includes the number of looks and events; details about futility and efficacy boundaries which include transformed information time at each look, cumulative beta and alpha respectively, p-values and crossing probabilities; etam(drift parameter); d2max(maximum number of events in the experimental group); delta_used(hazard ratio used in the design).

Author(s)

Tushar Patni, Yimei Li, Jianrong Wu, and Arzu Onar-Thomas.

References

Wu J, Xiong X (2016). “Survival trial design and monitoring using historical controls.” Pharmaceutical Statistics, 15(5), 405-411.

Wu J, Li Y (2020). “Group sequential design for historical control trials using error spending functions.” Journal of Biopharmaceutical Statistics, 30(2), 351-363.

Examples

#Sequential superiority trial for three equally spaced looks for OBF spending function.
gg<-FutDesign(k=c(0.3,0.6,1),alpha=0.05,beta=0.1,delta=0.57,d1=65,option="OBF",trial="Superiority")

Monitoring the trial at interim looks for a trial with futility monitoring only

Description

Calculates one-sided futility boundary values at the observed number of events.

Usage

FutIM(
  d2,
  dmax,
  last.look = FALSE,
  d1,
  etam,
  alpha,
  beta,
  opt = "OBF",
  param = 4
)

Arguments

d2

vector of number of events at which you want to monitor the trial.

dmax

maximum number of events in the experimental group caculated from design function.

last.look

logical which indicates whether the current look is the last look or not. Default is FALSE.

d1

total number of events in the historical control group.

etam

value of the drift parameter obtained from design function.

alpha

type I error.

beta

type II error.

opt

type of spending function: "OBF", "Gamma", "Rho" or "Pocock". Default is "OBF".

param

Parameter for Gamma family or Rho family. Default value is 4.

Details

The number of events have to be entered sequentially. See example.

Value

A list containing futility boundary values along with the p-values and transformed information time for the current look.Post-hoc power is also calculated in case of early stopping of the trial.

Author(s)

Tushar Patni, Yimei Li, Jianrong Wu, and Arzu Onar-Thomas.

References

Wu J, Xiong X (2016). “Survival trial design and monitoring using historical controls.” Pharmaceutical Statistics, 15(5), 405-411.

Wu J, Li Y (2020). “Group sequential design for historical control trials using error spending functions.” Journal of Biopharmaceutical Statistics, 30(2), 351-363.

Examples

#Interim look for the trial when the number of events is 13(first look).
gg<-FutIM(c(13),dmax=57,alpha=0.05,beta=0.1,etam=3.0726,d1=65,opt="OBF",last.look=FALSE)
#Interim look for the trial when the number of events is 35(second look).
gg<-FutIM(c(13,35),dmax=57,alpha=0.05,beta=0.1,etam=3.0726,d1=65,opt="OBF",last.look=FALSE)

HCT design with interim monitoring for both efficacy and futility

Description

The group sequential design for historical controlled survival outcome trials with both efficacy and futility boundaries.

Usage

HCTSurvDesign(
  k,
  alpha,
  beta,
  delta,
  d1,
  option = "OBF",
  param = 4,
  trial = "Superiority",
  delta0
)

Arguments

k

vector of time fraction for all planned looks: k=c(1/3,2/3,1) if the three planned looks will be carried out at 1/3, 2/3 and all of the total events in the experiment arm.

alpha

type I error.

beta

type II error.

delta

hazard ratio: hazard of experiment group over hazard of control group.

d1

total number of events in the historical control group.

option

type of spending function: "OBF", "Gamma", "Rho" or "Pocock". Default is "OBF".

param

Parameter for Gamma family or Rho family. Default value is 4.

trial

Type of trial: "Superiority" or "Non-inferiority". Default is "Superiority".

delta0

Non-inferiority margin.

Value

List of dataframes and vectors containing the details about the following: design of the trial which includes the number of looks and events; details about futility and efficacy boundaries which include transformed information time at each look, cumulative beta and alpha respectively, p-values and crossing probabilities; etam(drift parameter); d2max(maximum number of events in the experimental group); delta_used(hazard ratio used in the design).

Author(s)

Tushar Patni, Yimei Li, Jianrong Wu, and Arzu Onar-Thomas.

References

Wu J, Xiong X (2016). “Survival trial design and monitoring using historical controls.” Pharmaceutical Statistics, 15(5), 405-411.

Wu J, Li Y (2020). “Group sequential design for historical control trials using error spending functions.” Journal of Biopharmaceutical Statistics, 30(2), 351-363.

Examples

#Sequential superiority trial for three equally spaced looks for OBF spending function.
gg<-HCTSurvDesign(k=c(0.3,0.6,1),alpha=0.05,beta=0.1,delta=0.57,d1=65,option="OBF")

Monitoring the trial at interim looks for a trial with efficacy and futility boundaries

Description

Calculates one-sided boundary values at the observed number of events.

Usage

IM(d2, dmax, last.look = FALSE, d1, etam, alpha, beta, opt = "OBF", param = 4)

Arguments

d2

vector of number of events at which you want to monitor the trial.

dmax

maximum number of events in the experimental group calculated from design function.

last.look

logical which indicates whether the current look is the last look or not. Default is FALSE.

d1

total number of events in the historical control group.

etam

value of the drift parameter obtained from design function.

alpha

type I error.

beta

type II error.

opt

type of spending function: "OBF", "Gamma", "Rho" or "Pocock". Default is "OBF".

param

Parameter for Gamma family or Rho family. Default value is 4.

Details

The number of events have to be entered sequentially. See example.

Value

A list containing efficacy and futility boundary values along with the p-values and transformed information time for the current look. Post-hoc power is also calculated in case of early stopping of the trial.

Author(s)

Tushar Patni, Yimei Li, Jianrong Wu, and Arzu Onar-Thomas.

References

Wu J, Xiong X (2016). “Survival trial design and monitoring using historical controls.” Pharmaceutical Statistics, 15(5), 405-411.

Wu J, Li Y (2020). “Group sequential design for historical control trials using error spending functions.” Journal of Biopharmaceutical Statistics, 30(2), 351-363.

Examples

#Interim look for the trial when the number of events is 13(first look).
gg<-IM(c(13),dmax=57,alpha=0.05,beta=0.1,etam=3.0726,d1=65,opt="OBF",last.look=FALSE)
#Interim look for the trial when the number of events is 35(second look).
gg<-IM(c(13,35),dmax=57,alpha=0.05,beta=0.1,etam=3.0726,d1=65,opt="OBF",last.look=FALSE)

Log rank test for non-inferiority trial

Description

Calculates the score function of the log rank test for non-inferiority trial

Usage

sf(event, status, delta0, group, experiment, control)

Arguments

event

event time vector from person level trial data.

status

numeric vector indicating the status of event from person level trial data.

delta0

Non-inferiority margin.

group

group string vector indicating the assignment of patients into control or experimental group.

experiment

name of experimental group as character string.

control

name of control group as character string.

Value

Returns the value of score statistic.

Author(s)

Tushar Patni, Yimei Li, Jianrong Wu, and Arzu Onar-Thomas.

Examples

time<-c(20,65,12,50,58,65,45,44)
event<-c(1,0,0,0,1,1,1,1)
group<-c(rep("exp",4),rep("cont",4))
gg<-sf(event=time,status=event,delta0=1.3,group=group,experiment="exp",control="cont")

Sample size in terms of number of subjects in the experimental group

Description

Calculates the total number of subjects for the experimental group using the total number of events(d2max:the output from design functions) and the estimated failure probability based on the person level historical control data and proportional hazard assumption.

Usage

SM(time, event, d2max, opt = "KM", event_ind, ta, tf, delta)

Arguments

time

event time vector from person level historical control data.

event

numeric vector indicating the status of event from person level historical control data.

d2max

maximum number of events in the experimental group calculated from the design function.

opt

the method of fitting survival curve-"log_normal" or "KM" (log-normal or Kaplan Meier). Default is "KM".

event_ind

numeric value indicating the occurrence of event.

ta

enrollment time.

tf

follow-up time.

delta

hazard ratio.

Value

Returns the value of sample size.

Author(s)

Tushar Patni, Yimei Li, Jianrong Wu, and Arzu Onar-Thomas.

References

Wu J, Xiong X (2016). “Survival trial design and monitoring using historical controls.” Pharmaceutical Statistics, 15(5), 405-411.

Wu J, Li Y (2020). “Group sequential design for historical control trials using error spending functions.” Journal of Biopharmaceutical Statistics, 30(2), 351-363.

Examples

time<-c(20,65,12,50,58,65,45,44)
event<-c(1,0,0,0,1,1,1,1)
d2max=57
gg<-SM(time,event,d2max,opt="log_normal",ta=4,tf=3,delta=0.57,event_ind=1)