View source: R/postMonitoring.R
| decisionTimes | R Documentation |
Obtains times (in weeks) since trial initiation to crossing a harm, non-efficacy or efficacy boundary, or reaching the target number of events if no stopping boundary is crossed in an event-driven 2-arm trial design. The times are extracted from .RData files outputted by monitorTrial.
decisionTimes( monitorTrialFile, monitorTrialDir = NULL, saveFile = NULL, saveDir = monitorTrialDir )
monitorTrialFile |
either a character vector specifying (multiple) |
monitorTrialDir |
a character string specifying a path to the file(s) in |
saveFile |
a character string optionally specifying an |
saveDir |
a character string optionally specifying the file path for |
A list (of the same length as monitorTrialFile) of numeric vectors of times. The order of the vectors matches the order of components in monitorTrialFile. The length of each vector equals the number of simulated trials in the corresponding output list from monitorTrial.
simData <- simTrial(N=c(1000, 1000), aveVE=c(0, 0.4),
VEmodel="half", vePeriods=c(1, 27, 79), enrollPeriod=78,
enrollPartial=13, enrollPartialRelRate=0.5, dropoutRate=0.05,
infecRate=0.6, fuTime=156,
visitSchedule=c(0, (13/3)*(1:4), seq(13*6/3, 156, by=13*2/3)),
missVaccProb=0.05, VEcutoffWeek=26, nTrials=5,
stage1=78, randomSeed=300)
monitorData <- monitorTrial(dataFile=simData, stage1=78, stage2=156,
harmMonitorRange=c(10,75), harmMonitorAlpha=0.05,
effCohort=list(timingCohort=list(lagTime=0),
times=c(75, 150),
timeUnit="counts",
lagTime=0,
estimand="cox",
nullVE=0,
nominalAlphas=c(0.001525, 0.024501)),
nonEffCohorts=list(timingCohort=list(lagTime=0),
times=c(75, 150),
timeUnit="counts",
cohort1=list(lagTime=0,
estimand="cox",
nullVE=0.4,
nominalAlphas=c(0.001525, 0.024501))),
lowerVEnoneff=0, highVE=1, lowerVEuncPower=0,
alphaHigh=0.05, alphaUncPower=0.05,
verbose=FALSE)
times <- decisionTimes(list(monitorData))
## alternatively, to save the .RData output file (no '<-' needed):
## decisionTimes(list(monitorData), saveFile="decisionTimes.RData")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.