delta.estimate {SurrogateTest} | R Documentation |
Calculates the treatment effect, the difference in survival at time t
Description
This function calculates the treatment effect in the survival setting i.e. the difference in survival at time t between the treatment group and the control group. The inverse probability of censoring weighted estimate of survival within each treatment group is used; there is an option to use the Kaplan-Meier estimate instead. This function is generally not expected to be used directly by the user, it is called by the recover.B function.
Usage
delta.estimate(xone, xzero, deltaone, deltazero, t, weight = NULL, KM = FALSE)
Arguments
xone |
numeric vector, the observed event times in the treatment group, X = min(T,C) where T is the time of the primary outcome and C is the censoring time. |
xzero |
numeric vector, the observed event times in the control group, X = min(T,C) where T is the time of the primary outcome and C is the censoring time. |
deltaone |
numeric vector, the event indicators for the treatment group, D = I(T<C) where T is the time of the primary outcome and C is the censoring time. |
deltazero |
numeric vector, the event indicators for the control group, D = I(T<C) where T is the time of the primary outcome and C is the censoring time. |
t |
the time of interest. |
weight |
a |
KM |
true or false, indicating whether the Kaplan-Meier estimate of survival should be used instead of the inverse probability of censoring weighted estimate |
Value
the difference in survival at time t (treatment group minus control group)
Author(s)
Layla Parast
Examples
data(dataA)
delta.estimate(xone = dataA$x1, xzero = dataA$x0, deltaone = dataA$delta1, deltazero =
dataA$delta0, t=1)
delta.estimate(xone = dataA$x1, xzero = dataA$x0, deltaone = dataA$delta1, deltazero =
dataA$delta0, t=0.5)