getData {rpact} | R Documentation |
Returns the aggregated simulation data.
getData(x)
x |
A |
This function can be used to get the aggregated simulated data from an simulation results
object, for example, obtained by getSimulationSurvival
.
In this case, the data frame contains the following columns:
iterationNumber
: The number of the simulation iteration.
stageNumber
: The stage.
pi1
: The assumed or derived event rate in the treatment group.
pi2
: The assumed or derived event rate in the control group.
hazardRatio
: The hazard ratio under consideration (if available).
analysisTime
: The analysis time.
numberOfSubjects
: The number of subjects under consideration when the
(interim) analysis takes place.
eventsPerStage1
: The observed number of events per stage
in treatment group 1.
eventsPerStage2
: The observed number of events per stage
in treatment group 2.
eventsPerStage
: The observed number of events per stage
in both treatment groups.
rejectPerStage
: 1 if null hypothesis can be rejected, 0 otherwise.
eventsNotAchieved
: 1 if number of events could not be reached with
observed number of subjects, 0 otherwise.
futilityPerStage
: 1 if study should be stopped for futility, 0 otherwise.
testStatistic
: The test statistic that is used for the test decision,
depends on which design was chosen (group sequential, inverse normal,
or Fisher combination test)'
logRankStatistic
: Z-score statistic which corresponds to a one-sided
log-rank test at considered stage.
conditionalPowerAchieved
: The conditional power for the subsequent stage of the trial for
selected sample size and effect. The effect is either estimated from the data or can be
user defined with thetaH1
or pi1H1
and pi2H1
.
trialStop
: TRUE
if study should be stopped for efficacy or futility or final stage, FALSE
otherwise.
hazardRatioEstimateLR
: The estimated hazard ratio, derived from the
log-rank statistic.
A subset of variables is provided for getSimulationMeans
, getSimulationRates
, getSimulationMultiArmMeans
,
getSimulationMultiArmRates
, or getSimulationMultiArmSurvival
.
Returns a data.frame
.
results <- getSimulationSurvival(pi1 = seq(0.3,0.6,0.1), pi2 = 0.3, eventTime = 12, accrualTime = 24, plannedEvents = 40, maxNumberOfSubjects = 200, maxNumberOfIterations = 50) data <- getData(results) head(data) dim(data)