tabEventAccrual | R Documentation |
Tabulates side-by-side different event totals and time periods since first enrollment required to accrue the event totals. The user specifies a vector of either event totals or time points since first enrollment, and tabEventAccrual
completes the table.
tabEventAccrual( trialData, atEvents = NULL, atWeeks = NULL, prob = 0.5, lagTimeMITT = 0, lagTimePP = NULL, namePP = "pp1", na.ub = 0.2 )
trialData |
either a list of data frames from |
atEvents |
a numeric vector specifying treatment-pooled event counts for which empirical quantiles of time-to-accrual shall be calculated |
atWeeks |
a numeric vector specifying time points (in weeks) since first enrollment for which empirical quantiles of treatment-pooled event counts shall be calculated |
prob |
a numeric value in (0, 1) specifying the probability at which the empirical quantiles across the simulated trials are computed (default is 0.5) |
lagTimeMITT |
a time point (in weeks). Only events with time-to-event ≥ |
lagTimePP |
a time point (in weeks). If specified, only PP events with time-to-event ≥ |
namePP |
a character string specifying the name of the column in each data frame in |
na.ub |
a numeric value specifying an upper limit on the fraction of simulated trials that do not reach a given event count in |
All time variables use week as the unit of time.
If the user specifies atEvents
, time periods since first enrollment are computed that are needed to observe atEvents
MITT and atEvents
PP events.
If the user specifies atWeeks
, MITT and PP event totals are computed that are observed by atWeeks
weeks since first enrollment.
The function inputs a large number of simulated trial data, and the computed variables (time periods or event totals) are empirical quantiles at probability prob
of the sample distributions (of time periods or event totals). Medians are computed by default.
A data frame (with at least two columns) of event totals and associated time periods since first enrollment required to accrue the event totals in the MITT cohort. If an PP cohort is specified (via lagTimePP
), a third column is added.
simTrial
simData <- simTrial(N=c(1000, rep(700, 2)), aveVE=seq(0, 0.4, by=0.2), 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, blockSize=NULL, stage1=78, randomSeed=300) ## user specifies MITT event totals tabEventAccrual(simData$trialData, atEvents=seq(10, 100, by=10)) ## user specifies MITT and PP event totals tabEventAccrual(simData$trialData, atEvents=seq(10, 100, by=10), lagTimePP=6) ## user specifies time points since first enrollment tabEventAccrual(simData$trialData, atWeeks=seq(52, 156, by=8), lagTimePP=6)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.