Learn R Programming

seqDesign (version 1.0.0)

VEpowerPP: Power to Detect Positive Treatment Efficacy in a Per-Protocol Cohort

Description

VEpowerPP computes power to detect positive treatment (vaccine) efficacy in per-protocol cohorts identified in simTrial-generated data-sets.

Usage

VEpowerPP(dataList, VEcutoffWeek, stage1, alpha, outName = NULL, 
          saveDir = NULL)

Arguments

dataList
if saveDir = NULL, a list of objects returned by simTrial; otherwise a list of .RData file names (character strings) generated by simTrial
VEcutoffWeek
a cut-off time (in weeks). Only subjects with the follow-up time exceeding VEcutoffWeek are included in the per-protocol cohort.
stage1
the final week of stage 1 in a two-stage trial. The VE(post-VEcutoffWeek--stage1) estimand is considered in the power calculation.
alpha
the nominal significance level of the one-sided test of the null hypothesis that VE(post-VEcutoffWeek--stage1) $\le$ 0%
outName
a character string specifying the output .RData file name. If outName = NULL but saveDir is specified, the output file is named VEpwPP.RData.
saveDir
a character string specifying a path for the output directory. If supplied, the output is saved as an .RData file named outName in the directory; otherwise the output is returned as a list.

Value

  • If saveDir is specified, the output list (named pwList) is saved as an .RData file named outName (or VEpwPP.RData if left unspecified); otherwise the output list is returned. The output object is a list (of equal length as dataList) of lists with the following components:
  • VEa numeric vector of VE(post-VEcutoffWeek--stage1) estimates for each missing vaccination probability in missVaccProb of simTrial
  • VEpwPPa numeric vector of powers to reject the null hypothesis H0: VE(post-VEcutoffWeek--stage1) $\le$ 0% for each missing vaccination probability in missVaccProb of simTrial

Details

All time variables use week as the unit of time. Month is defined as 52/12 weeks. A per-protocol cohort indicator is assumed to be included in the simTrial-generated data-sets, which is ensured by specifying the missVaccProb argument in simTrial. VE(post-VEcutoffWeek--stage1) is estimated as one minus the ratio of Nelson-Aalen-based cumulative incidence functions. VEpowerPP computes power to reject the null hypothesis H0: VE(post-VEcutoffWeek--stage1) $\le$ 0% using the one-sided Nelson-Aalen cumulative hazard-based Wald test at the alpha level of significance.

See Also

simTrial

Examples

Run this code
simData <- simTrial(N=rep(1000, 2), aveVE=c(0, 0.4), VEmodel="half", 
                    vePeriods=c(1, 27, 79), enrollPeriod=78, 
                    enrollPartial=13, enrollPartialRelRate=0.5, dropoutRate=0.05, 
                    infecRate=0.04, fuTime=156, 
                    visitSchedule=c(0, (13/3)*(1:4), seq(13*6/3, 156, by=13*2/3)),
                    missVaccProb=c(0,0.05,0.1,0.15), VEcutoffWeek=26, nTrials=30, 
                    stage1=78, randomSeed=300)
                    
VEpwPP <- VEpowerPP(dataList=list(simData), VEcutoffWeek=26, stage1=78, 
                    alpha=0.025)

### alternatively, to save the .RData output file (no '<-' needed):
###
### simTrial(N=rep(1000, 2), aveVE=c(0, 0.4), VEmodel="half", 
###          vePeriods=c(1, 27, 79), enrollPeriod=78, enrollPartial=13, 
###          enrollPartialRelRate=0.5, dropoutRate=0.05, infecRate=0.04, fuTime=156, 
###          visitSchedule=c(0, (13/3)*(1:4), seq(13*6/3, 156, by=13*2/3)), 
###          missVaccProb=c(0,0.05,0.1,0.15), VEcutoffWeek=26, nTrials=30, 
###          stage1=78, saveDir="./", randomSeed=300)
###
### VEpowerPP(dataList=
###           list("simTrial_nPlac=1000_nVacc=1000_aveVE=0.4_infRate=0.04.RData"),
###           VEcutoffWeek=26, stage1=78, alpha=0.025, saveDir="./")

Run the code above in your browser using DataLab