Returns the event probabilities for specified parameters at given time vector.
getEventProbabilities(
time,
...,
accrualTime = c(0L, 12L),
accrualIntensity = 0.1,
kappa = 1,
piecewiseSurvivalTime = NA_real_,
lambda2 = NA_real_,
lambda1 = NA_real_,
allocationRatioPlanned = 1,
hazardRatio = NA_real_,
dropoutRate1 = 0,
dropoutRate2 = 0,
dropoutTime = 12L,
maxNumberOfSubjects = NA_real_
)
A numeric vector with time values.
Ensures that all arguments (starting from the "...") are to be named and that a warning will be displayed if unknown arguments are passed.
The assumed accrual time intervals for the study, default is
c(0, 12)
(for details see getAccrualTime
).
A vector of accrual intensities, default is the relative
intensity 0.1
(for details see getAccrualTime
).
A numeric value >= 0. A kappa != 1
will be used for the specification
of the shape of the Weibull distribution.
Default is 1
, i.e., the exponential survival distribution is used instead of the Weibull distribution.
Note that the Weibull distribution cannot be used for the piecewise definition of
the survival time distribution, i.e., only lambda
and kappa
need to be specified.
This function is equivalent to pweibull(t, shape = kappa, scale = 1 / lambda)
of the stats
package, i.e.,
the scale parameter is 1 / 'hazard rate'
.
For example,
getPiecewiseExponentialDistribution(time = 130, piecewiseLambda = 0.01, kappa = 4.2)
and pweibull(q = 130, shape = 4.2, scale = 1 / 0.01)
provide the sample result.
A vector that specifies the time intervals for the piecewise
definition of the exponential survival time cumulative distribution function
(for details see getPiecewiseSurvivalTime
).
The assumed hazard rate in the reference group, there is no default.
lambda2
can also be used to define piecewise exponentially distributed survival times (see details).
The assumed hazard rate in the treatment group, there is no default.
lambda1
can also be used to define piecewise exponentially distributed survival times (see details).
The planned allocation ratio n1 / n2
for a two treatment groups
design, default is 1
. If allocationRatioPlanned = 0
is entered,
the optimal allocation ratio yielding the smallest overall sample size is determined.
The vector of hazard ratios under consideration. If the event or hazard rates in both treatment groups are defined, the hazard ratio needs not to be specified as it is calculated, there is no default.
The assumed drop-out rate in the treatment group, default is 0
.
The assumed drop-out rate in the control group, default is 0
.
The assumed time for drop-out rates in the control and the
treatment group, default is 12
.
If maxNumberOfSubjects > 0
is specified,
the end of accrual at specified accrualIntensity
for the specified
number of subjects is determined or accrualIntensity
is calculated
at fixed end of accrual.
Returns a EventProbabilities
object.
The following generics (R generic functions) are available for this result object:
names
to obtain the field names,
print
to print the object,
summary
to display a summary of the object,
plot
to plot the object,
as.data.frame
to coerce the object to a data.frame
,
Click on the link of a generic in the list above to go directly to the help documentation of
the rpact
specific implementation of the generic.
Note that you can use the R function methods
to get all the methods of a generic and
to identify the object specific name of it, e.g.,
use methods("plot")
to get all the methods for the plot
generic.
There you can find, e.g., plot.AnalysisResults
and
obtain the specific help documentation linked above by typing ?plot.AnalysisResults
.
The function computes the overall event probabilities in a two treatment groups design.
For details of the parameters see getSampleSizeSurvival
.
# NOT RUN {
# Calculate event probabilities for staggered subjects' entry, piecewisely defined
# survival time and hazards, and plot it.
timeVector <- seq(0, 100, 1)
y <- getEventProbabilities(timeVector, accrualTime = c(0, 20, 60),
accrualIntensity = c(5, 20),
piecewiseSurvivalTime = c(0, 20, 80),
lambda2 = c(0.02, 0.06, 0.1),
hazardRatio = 2
)
# }
# NOT RUN {
plot(timeVector, y$overallEventProbabilities, type = 'l')
# }
Run the code above in your browser using DataLab