getPiecewiseSurvivalTime {rpact}  R Documentation 
Returns a PiecewiseSurvivalTime
object that contains the all relevant parameters
of an exponential survival time cumulative distribution function.
Use names
to obtain the field names.
getPiecewiseSurvivalTime( piecewiseSurvivalTime = NA_real_, ..., lambda1 = NA_real_, lambda2 = NA_real_, hazardRatio = NA_real_, pi1 = NA_real_, pi2 = NA_real_, median1 = NA_real_, median2 = NA_real_, eventTime = 12L, kappa = 1, delayedResponseAllowed = FALSE )
piecewiseSurvivalTime 
A vector that specifies the time intervals for the piecewise definition of the exponential survival time cumulative distribution function (see details). 
... 
Ensures that all arguments (starting from the "...") are to be named and that a warning will be displayed if unknown arguments are passed. 
lambda1 
The assumed hazard rate in the treatment group, there is no default.

lambda2 
The assumed hazard rate in the reference group, there is no default.

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. 
pi1 
A numeric value or vector that represents the assumed event rate in the treatment group,
default is 
pi2 
A numeric value that represents the assumed event rate in the control group, default is 
median1 
The assumed median survival time in the treatment group, there is no default. 
median2 
The assumed median survival time in the reference group, there is no default. 
eventTime 
The assumed time under which the event rates are calculated, default is 
kappa 
A numeric value >= 0. A 
delayedResponseAllowed 
If 
Returns a PiecewiseSurvivalTime
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
,
The first element of the vector piecewiseSurvivalTime
must be equal to 0
.
piecewiseSurvivalTime
can also be a list that combines the definition of the
time intervals and hazard rates in the reference group.
The definition of the survival time in the treatment group is obtained by the specification
of the hazard ratio (see examples for details).
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
.
getPiecewiseSurvivalTime(lambda2 = 0.5, hazardRatio = 0.8) getPiecewiseSurvivalTime(lambda2 = 0.5, lambda1 = 0.4) getPiecewiseSurvivalTime(pi2 = 0.5, hazardRatio = 0.8) getPiecewiseSurvivalTime(pi2 = 0.5, pi1 = 0.4) getPiecewiseSurvivalTime(pi1 = 0.3) getPiecewiseSurvivalTime(hazardRatio = c(0.6, 0.8), lambda2 = 0.4) getPiecewiseSurvivalTime(piecewiseSurvivalTime = c(0, 6, 9), lambda2 = c(0.025, 0.04, 0.015), hazardRatio = 0.8) getPiecewiseSurvivalTime(piecewiseSurvivalTime = c(0, 6, 9), lambda2 = c(0.025, 0.04, 0.015), lambda1 = c(0.025, 0.04, 0.015) * 0.8) pwst < getPiecewiseSurvivalTime(list( "0  <6" = 0.025, "6  <9" = 0.04, "9  <15" = 0.015, "15  <21" = 0.01, ">=21" = 0.007), hazardRatio = 0.75) pwst # The object created by getPiecewiseSurvivalTime() can be used directly in # getSampleSizeSurvival(): getSampleSizeSurvival(piecewiseSurvivalTime = pwst) # The object created by getPiecewiseSurvivalTime() can be used directly in # getPowerSurvival(): getPowerSurvival(piecewiseSurvivalTime = pwst, maxNumberOfEvents = 40, maxNumberOfSubjects = 100)