View source: R/f_design_plan_survival.R
getEventProbabilities | R Documentation |
Returns the event probabilities for specified parameters at given time vector.
getEventProbabilities(
time,
...,
accrualTime = c(0, 12),
accrualIntensity = 0.1,
accrualIntensityType = c("auto", "absolute", "relative"),
kappa = 1,
piecewiseSurvivalTime = NA_real_,
lambda2 = NA_real_,
lambda1 = NA_real_,
allocationRatioPlanned = 1,
hazardRatio = NA_real_,
dropoutRate1 = 0,
dropoutRate2 = 0,
dropoutTime = 12,
maxNumberOfSubjects = NA_real_
)
time |
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. |
accrualTime |
The assumed accrual time intervals for the study, default is
|
accrualIntensity |
A numeric vector of accrual intensities, default is the relative
intensity |
accrualIntensityType |
A character value specifying the accrual intensity input type.
Must be one of |
kappa |
A numeric value > 0. A |
piecewiseSurvivalTime |
A vector that specifies the time intervals for the piecewise
definition of the exponential survival time cumulative distribution function |
lambda2 |
The assumed hazard rate in the reference group, there is no default.
|
lambda1 |
The assumed hazard rate in the treatment group, there is no default.
|
allocationRatioPlanned |
The planned allocation ratio |
hazardRatio |
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. Must be a positive numeric of length 1. |
dropoutRate1 |
The assumed drop-out rate in the treatment group, default is |
dropoutRate2 |
The assumed drop-out rate in the control group, default is |
dropoutTime |
The assumed time for drop-out rates in the control and the
treatment group, default is |
maxNumberOfSubjects |
If |
The function computes the overall event probabilities in a two treatment groups design.
For details of the parameters see getSampleSizeSurvival()
.
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
,
as.matrix()
to coerce the object to a matrix
.
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
.
## 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
)
plot(timeVector, y$cumulativeEventProbabilities, type = 'l')
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.