delta.estimate: Calculates the treatment effect, the difference in survival...

Description Usage Arguments Value Author(s) Examples

View source: R/Functions_SurrogateTest.R

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

1
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 n_1+n_0 by x matrix of weights where n_1 = sample size in the treatment group and n_0 = sample size in the control group, default is null; generally not supplied by user, only used by other functions.

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

1
2
3
4
5
6
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)

SurrogateTest documentation built on Nov. 16, 2021, 9:10 a.m.