# Unconditional Power to Detect Positive Treatment Efficacy in a Per-Protocol Cohort

### Description

`VEpowerPP`

computes unconditional power to detect positive treatment (vaccine) efficacy in per-protocol cohorts identified in `simTrial`

-generated data-sets.

### Usage

1 2 |

### Arguments

`dataList` |
if |

`lowerVEuncPower` |
a numeric value specifying a one-sided null hypothesis H0: VE( |

`alphaUncPower` |
one minus the nominal confidence level of the two-sided confidence interval used to test the one-sided null hypothesis H0: VE( |

`VEcutoffWeek` |
a cut-off time (in weeks). Only subjects with the follow-up time exceeding |

`stage1` |
the final week of stage 1 in a two-stage trial |

`outName` |
a character string specifying the output |

`saveDir` |
a character string specifying a path for the output directory. If supplied, the output is saved as an |

`verbose` |
a logical value indicating whether information on the output directory and file name should be printed out (default is |

### 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(`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(`VEcutoffWeek`

–`stage1`

) *≤* `lowerVEuncPower`

x 100%. H0 is rejected if the lower bound of the two-sided (1-`alphaUncPower`

) x 100% confidence interval for VE(`VEcutoffWeek`

–`stage1`

) lies above `lowerVEuncPower`

.

### 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:

`VE` |
a numeric vector of VE( |

`VEpwPP` |
a numeric vector of powers to reject the null hypothesis H0: VE( |

### See Also

`simTrial`

### Examples

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | ```
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=5,
stage1=78, randomSeed=300)
monitorData <- monitorTrial(dataFile=simData, stage1=78, stage2=156,
harmMonitorRange=c(10,100), alphaPerTest=0.0106,
minCnt=50, minPct=0.33, week1=26, minCnt2=2, week2=52,
nonEffInterval=20, lowerVEnoneff=0, upperVEnoneff=0.4,
highVE=0.7, stage1VE=0, lowerVEuncPower=0,
alphaNoneff=0.05, alphaHigh=0.05, alphaStage1=0.05,
alphaUncPower=0.05, estimand="cuminc", VEcutoffWeek=26)
censData <- censTrial(dataFile=simData, monitorFile=monitorData, stage1=78,
stage2=156)
VEpwPP <- VEpowerPP(dataList=list(censData), lowerVEuncPower=0, alphaUncPower=0.05,
VEcutoffWeek=26, stage1=78)
### 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)
###
### monitorTrial(dataFile=
### "simTrial_nPlac=1000_nVacc=1000_aveVE=0.4_infRate=0.04.RData",
### stage1=78, stage2=156, harmMonitorRange=c(10,100), alphaPerTest=0.0106,
### minCnt=50, minPct=0.33, week1=26, minCnt2=2, week2=52, nonEffInterval=20,
### lowerVEnoneff=0, upperVEnoneff=0.4, highVE=0.7, stage1VE=0,
### lowerVEuncPower=0, alphaNoneff=0.05, alphaHigh=0.05, alphaStage1=0.05,
### alphaUncPower=0.05, estimand="cuminc", VEcutoffWeek=26, saveDir="./")
###
### censTrial(dataFile=
### "simTrial_nPlac=1000_nVacc=1000_aveVE=0.4_infRate=0.04.RData",
### monitorFile=
### "monitorTrial_nPlac=1000_nVacc=1000_aveVE=0.4_infRate=0.04_cuminc.RData",
### stage1=78, stage2=156, saveDir="./")
###
### VEpowerPP(dataList=
### list("trialDataCens_nPlac=1000_nVacc=1000_aveVE=0.4_infRate=0.04_cuminc.RData"),
### lowerVEuncPower=0, alphaUncPower=0.05, VEcutoffWeek=26, stage1=78, saveDir="./")
``` |