| lrsim_mams | R Documentation |
Simulate a multi-arm multi-stage design using a weighted log-rank test. Analyses can be triggered either by the cumulative number of events (combined for an active arm and the common control) or by pre-specified calendar times.
lrsim_mams(
M = 2,
kMax = 1,
criticalValues = NULL,
futilityBounds = NULL,
hazardRatioH0s = 1,
allocations = 1,
accrualTime = 0,
accrualIntensity = NA,
piecewiseSurvivalTime = 0,
stratumFraction = 1,
lambdas = NULL,
gammas = NULL,
n = NA,
followupTime = NA,
fixedFollowup = FALSE,
rho1 = 0,
rho2 = 0,
plannedEvents = NA,
plannedTime = NA,
maxNumberOfIterations = 1000,
maxNumberOfRawDatasetsPerStage = 0,
seed = 0,
nthreads = 0
)
M |
Number of active treatment arms. |
kMax |
Number of sequential looks. |
criticalValues |
The matrix of by-level upper boundaries on the
max z-test statistic scale for efficacy stopping.
The first column is for level
|
futilityBounds |
Numeric vector of length |
hazardRatioH0s |
Numeric vector of length |
allocations |
Integer or integer vector of length |
accrualTime |
A vector that specifies the starting time of
piecewise Poisson enrollment time intervals. Must start with 0, e.g.,
|
accrualIntensity |
A vector of accrual intensities. One for each accrual time interval. |
piecewiseSurvivalTime |
A vector that specifies the starting time of
piecewise exponential survival time intervals. Must start with 0, e.g.,
|
stratumFraction |
A vector of stratum fractions that sum to 1. Defaults to 1 for no stratification. |
lambdas |
List of length |
gammas |
List of length |
n |
Planned total sample size across all active arms and control. |
followupTime |
Follow-up time for the last enrolled subject. |
fixedFollowup |
Whether a fixed follow-up design is used.
Defaults to |
rho1 |
The first parameter of the Fleming-Harrington family of weighted log-rank test. Defaults to 0 for conventional log-rank test. |
rho2 |
The second parameter of the Fleming-Harrington family of weighted log-rank test. Defaults to 0 for conventional log-rank test. |
plannedEvents |
Numeric vector of length |
plannedTime |
Numeric vector of calendar times for the analyses.
If |
maxNumberOfIterations |
Number of Monte Carlo replications. Defaults to 1000. |
maxNumberOfRawDatasetsPerStage |
Number of subject-level raw datasets to retain per stage (for selected replications). |
seed |
Random seed for reproducibility. |
nthreads |
Number of threads for parallel simulation. Use 0 to accept the default RcppParallel behavior. |
An S3 object of class "lrsim_seamless" with these components:
overview: A list summarizing trial-level results and settings:
overallReject: Overall probability of rejecting the null
by trial end.
overallFutility: Overall probability of stopping for futility
by trial end.
rejectPerStage: Probability of rejecting the null for each
active arm at each stage.
futilityPerStage: Probability of futility stopping for each arm
at each stage.
cumulativeRejection: Cumulative probability of rejection
for each active arm by stage.
cumulativeFutility: Cumulative probability of futility
stopping for each active arm by stage.
numberOfEvents: Cumulative event counts by stage and arm.
numberOfDropouts: Cumulative dropouts by stage and arm.
numberOfSubjects: Cumulative enrollments by stage and arm.
analysisTime: Average calendar time for each stage by arm
among replications that reached that stage.
expectedNumberOfEvents: Expected cumulative events at trial end.
expectedNumberOfDropouts: Expected cumulative dropouts at trial end.
expectedNumberOfSubjects: Expected cumulative enrollments
at trial end.
expectedStudyDuration: Expected study duration.
criticalValues: The input matrix of by-level critical boundaries.
futilityBounds: The input vector of futility boundaries.
hazardRatioH0s: The input hazard ratios under H_0.
useEvents: Logical indicating whether analyses were event-driven.
numberOfIterations: Number of simulation iterations performed.
n: Planned total sample size.
fixedFollowup: Logical indicating whether fixed follow-up was used.
rho1, rho2: FlemingāHarrington weighting parameters used.
M: Number of active arms in Phase 2.
K: Number of sequential looks in Phase 3.
sumdata1: Data frame summarizing each iteration, stage, and
treatment group:
iterationNumber, eventsNotAchieved,
stopStage, stageNumber,
analysisTime, treatmentGroup, accruals,
events, dropouts.
For each stage the final row summarizes the overall study (all arms combined).
summdata2: Data frame summarizing log-rank statistics by iteration,
stage, and active arm:
iterationNumber, stopStage, stageNumber,
analysisTime, activeArm,
totalAccruals, totalEvents, totalDropouts,
uscore, vscore, logRankStatistic,
reject, futility.
For each active arm, total accruals, events, and dropouts refer to the combined counts for that arm and the common control at that stage.
rawdata (present when maxNumberOfRawDatasetsPerStage > 0):
Subject-level data for selected replications with variables:
iterationNumber, stopStage, stageNumber,
analysisTime, subjectId, arrivalTime,
stratum, treatmentGroup,
survivalTime, dropoutTime, timeUnderObservation,
event, dropoutEvent.
Kaifeng Lu, kaifenglu@gmail.com
(sim1 <- lrsim_mams(
M = 2,
kMax = 3,
criticalValues = matrix(c(3.880, 2.747, 2.275,
3.710, 2.511, 1.993), 3, 2),
futilityBounds = c(0.074, 1.207),
accrualTime = c(0, 8),
accrualIntensity = c(10, 28),
piecewiseSurvivalTime = 0,
lambdas = list(log(2)/12*0.5, log(2)/12*0.75, log(2)/12),
n = 700,
plannedEvents = c(36, 72, 108),
maxNumberOfIterations = 10000,
maxNumberOfRawDatasetsPerStage = 1,
seed = 314159,
nthreads = 0))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.