Type: | Package |
Title: | Early Testing for a Treatment Effect using Surrogate Marker Information |
Version: | 1.3 |
Date: | 2021-11-15 |
Author: | Layla Parast |
Maintainer: | Layla Parast <parast@austin.utexas.edu> |
Description: | Provides functions to test for a treatment effect in terms of the difference in survival between a treatment group and a control group using surrogate marker information obtained at some early time point in a time-to-event outcome setting. Nonparametric kernel estimation is used to estimate the test statistic and perturbation resampling is used for variance estimation. More details will be available in the future in: Parast L, Cai T, Tian L (2019) “Using a Surrogate Marker for Early Testing of a Treatment Effect" Biometrics, 75(4):1253-1263. <doi:10.1111/biom.13067>. |
License: | GPL-2 | GPL-3 [expanded from: GPL] |
Imports: | stats, survival |
NeedsCompilation: | no |
Packaged: | 2021-11-15 12:37:35 UTC; parast |
Repository: | CRAN |
Date/Publication: | 2021-11-16 08:00:05 UTC |
Calculates kernel matrix
Description
Helper function; this calculates the kernel matrix
Usage
Kern.FUN(zz, zi, bw, kern0)
Arguments
zz |
zz |
zi |
zi |
bw |
bandwidth |
kern0 |
kernel distribution |
Value
the kernel matrix
Author(s)
Layla Parast
Repeats a row.
Description
Helper function; this function creates a matrix that repeats vc, dm times where each row is equal to the vc vector.
Usage
VTM(vc, dm)
Arguments
vc |
the vector to repeat. |
dm |
number of rows. |
Value
a matrix that repeats vc, dm times where each row is equal to the vc vector
Calculates censoring probability for weighting
Description
Helper function; calculates censoring probability needed for inverse probability of censoring weighting
Usage
censor.weight(data.x, data.delta, t, weight = NULL)
Arguments
data.x |
numeric vector, the observed event time: X = min(T, C) where T is the time of the primary outcome, C is the censoring time. |
data.delta |
numeric vector of 0/1, the censoring indicator: D = I(T<C) where T is the time of the primary outcome, C is the censoring time. |
t |
number, the time of interest. |
weight |
a numeric vector or matrix of weights used for perturbation-resampling, default is null. |
Details
Computes the Kaplan Meier estimate of survival for the censoring random variable at the specified time
Value
Kaplan Meier estimate of survival for censoring at time t
Author(s)
Layla Parast
Examples
data(dataA)
censor.weight(data.x = dataA$x1, data.delta = dataA$delta1, t=0.5)
Helper function
Description
Helper function; should not be called directly by user.
Usage
cumsum2(mydat)
Arguments
mydat |
mydat |
Value
out |
matrix |
Author(s)
Layla Parast
Hypothetical Study A data
Description
Hypothetical Study A data to be used in examples; t=1 and the landmark time = 0.50.
Usage
data(dataA)
Format
A list with 6 elements representing 1000 observations from a control group and 1000 observations from a treatment group:
s1
Surrogate marker measurement for treated observations; this marker is measured at time = 0.5. For observations that experience the primary outcome or are censored before 0.5, this value is NA.
x1
The observed event or censoring time for treated observations; X = min(T, C) where T is the time of the primary outcome and C is the censoring time.
delta1
The indicator identifying whether the treated observation was observed to have the event or was censored; D =1*(T<C) where T is the time of the primary outcome and C is the censoring time.
s0
Surrogate marker measurement for control observations; this marker is measured at time = 0.5. For observations that experience the primary outcome or are censored before 0.5, this value is NA.
x0
The observed event or censoring time for control observations; X = min(T, C) where T is the time of the primary outcome and C is the censoring time.
delta0
The indicator identifying whether the control observation was observed to have the event or was censored; D =1*(T<C) where T is the time of the primary outcome and C is the censoring time.
Details
Note that if the observation is censored or experienced the primary outcome before the landmark time of 0.50, the surrogate marker measurement is not observed and coded NA.
Examples
data(dataA)
names(dataA)
Hypothetical Study B data
Description
Hypothetical Study B data to be used in examples; landmark time = 0.50.
Usage
data(dataB)
Format
A list with 6 elements representing 800 observations from a control group and 800 observations from a treatment group:
s1
Surrogate marker measurement for treated observations; this marker is measured at time = 0.5. For observations that experience the primary outcome or are censored before 0.5, this value is NA.
x1
The observed event or censoring time for treated observations; X = min(T, C) where T is the time of the primary outcome and C is the censoring time. This time is administratively censored at 0.55 (see details).
delta1
The indicator identifying whether the treated observation was observed to have the event or was censored; D =1*(T<C) where T is the time of the primary outcome and C is the censoring time.
s0
Surrogate marker measurement for control observations; this marker is measured at time = 0.5. For observations that experience the primary outcome or are censored before 0.5, this value is NA.
x0
The observed event or censoring time for control observations; X = min(T, C) where T is the time of the primary outcome and C is the censoring time. This time is administratively censored at 0.55 (see details).
delta0
The indicator identifying whether the control observation was observed to have the event or was censored; D =1*(T<C) where T is the time of the primary outcome and C is the censoring time.
Details
Note that if the observation is censored or experienced the primary outcome before the landmark time of 0.50, the surrogate marker measurement is not observed and coded NA. In addition, Study B data is only observed up to the landmark time plus some epsilon, here epsilon=0.05 such that all observations are essentially adminstratively censored at time=0.55.
Examples
data(dataB)
names(dataB)
Calculates the early treatment effect estimate in Study A
Description
Calculates the early treatment effect estimate in Study B, generally not called directly by the user
Usage
delta.ea.single(Axzero, Adeltazero, Aszero, Bxzero, Bdeltazero,
Bszero, Bxone, Bdeltaone, Bsone, t, landmark, weightA = NULL,
weightB = NULL, weight.both = NULL, extrapolate)
Arguments
Axzero |
observed event times in the control group in Study A |
Adeltazero |
event/censoring indicators in the control group in Study A |
Aszero |
surrogate marker values in the control group in Study A, NA for individuals not observable at the time the surrogate marker was measured |
Bxzero |
observed event times in the control group in Study A |
Bdeltazero |
event/censoring indicators in the control group in Study A |
Bszero |
surrogate marker values in the control group in Study A, NA for individuals not observable at the time the surrogate marker was measured |
Bxone |
observed event times in the treatment group in Study A |
Bdeltaone |
event/censoring indicators in the treatment group in Study A |
Bsone |
surrogate marker values in the treatment group in Study A, NA for individuals not observable at the time the surrogate marker was measured |
t |
time of interest |
landmark |
landmark time of interest, t0 |
weightA |
Study A weights used for perturbation resampling |
weightB |
Study A weights used for perturbation resampling |
weight.both |
Study A (replicated) weights used for perturbation resampling |
extrapolate |
TRUE or FALSE; indicates whether local constant extrapolation should be used |
Details
Details are included in the documentation for design.study and recover.B
Value
early treatment effect estimate
Author(s)
Layla Parast
Examples
data(dataA)
delta.ea.single(Axzero = dataA$x0, Adeltazero = dataA$delta0,
Aszero = dataA$s0, Bxzero = dataA$x0, Bdeltazero = dataA$delta0,
Bszero = dataA$s0, Bxone = dataA$x1, Bdeltaone = dataA$delta1,
Bsone = dataA$s1, t=1, landmark=0.5, extrapolate = TRUE)
Calculates the early treatment effect estimate in Study B
Description
Calculates the early treatment effect estimate in Study B, generally not called directly by the user
Usage
delta.eb.single(Axzero, Adeltazero, Aszero, Bxzero, Bdeltazero,
Bszero, Bxone, Bdeltaone, Bsone, t, landmark, weightA = NULL,
weightB = NULL, weight.both = NULL, extrapolate)
Arguments
Axzero |
observed event times in the control group in Study A |
Adeltazero |
event/censoring indicators in the control group in Study A |
Aszero |
surrogate marker values in the control group in Study A, NA for individuals not observable at the time the surrogate marker was measured |
Bxzero |
observed event times in the control group in Study B |
Bdeltazero |
event/censoring indicators in the control group in Study B |
Bszero |
surrogate marker values in the control group in Study B, NA for individuals not observable at the time the surrogate marker was measured |
Bxone |
observed event times in the treatment group in Study B |
Bdeltaone |
event/censoring indicators in the treatment group in Study B |
Bsone |
surrogate marker values in the treatment group in Study B, NA for individuals not observable at the time the surrogate marker was measured |
t |
time of interest |
landmark |
landmark time of interest, t0 |
weightA |
Study A weights used for perturbation resampling |
weightB |
Study B weights used for perturbation resampling |
weight.both |
Study A and Study B weights used for perturbation resampling |
extrapolate |
TRUE or FALSE; indicates whether local constant extrapolation should be used |
Details
Details are included in the documentation for early.delta.test
Value
early treatment effect estimate
Author(s)
Layla Parast
Examples
data(dataA)
data(dataB)
delta.eb.single(Axzero = dataA$x0, Adeltazero = dataA$delta0,
Aszero = dataA$s0, Bxzero = dataB$x0, Bdeltazero = dataB$delta0,
Bszero = dataB$s0, Bxone = dataB$x1, Bdeltaone = dataB$delta1,
Bsone = dataB$s1, t=1, landmark=0.5, extrapolate = TRUE)
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)
Power and sample size calculation for designing a future study
Description
Power and sample size calculation for designing a future study
Usage
design.study(Axzero, Adeltazero, Aszero, Axone = NULL, Adeltaone = NULL, Asone =
NULL, delta.ea = NULL, psi = NULL, R.A.given = NULL, t, landmark, extrapolate = T,
adjustment = F, n = NULL, power = NULL, pi.1 = 0.5, pi.0 = 0.5, cens.rate, transform = F)
Arguments
Axzero |
observed event times in the control group in Study A |
Adeltazero |
event/censoring indicators in the control group in Study A |
Aszero |
surrogate marker values in the control group in Study A, NA for individuals not observable at the time the surrogate marker was measured |
Axone |
observed event times in the treatment group in Study A; optional (user must provide either (1) data from treatment arm in Study A or (2) hypothesized values for delta.ea (or R.A.given)and psi or (3) data from treatment arm in Study A and hypothesized psi (if different from observed treatment effect at t in Study A)) |
Adeltaone |
event/censoring indicators in the treatment group in Study A; optional (user must provide either (1) data from treatment arm in Study A or (2) hypothesized values for delta.ea (or R.A.given)and psi or (3) data from treatment arm in Study A and hypothesized psi (if different from observed treatment effect at t in Study A)) |
Asone |
surrogate marker values in the treatment group in Study A, NA for individuals not observable at the time the surrogate marker was measured; optional (user must provide either (1) data from treatment arm in Study A or (2) hypothesized values for delta.ea (or R.A.given) and psi or (3) data from treatment arm in Study A and hypothesized psi (if different from observed treatment effect at t in Study A)) |
delta.ea |
hypothesized value for the early treatment effect at time t0; optional (user must provide either (1) data from treatment arm in Study A or (2) hypothesized values for delta.ea (or R.A.given) and psi or (3) data from treatment arm in Study A and hypothesized psi (if different from observed treatment effect at t in Study A)), if not given then it is assumed that this quantity equals the osberved early treatment effect at time t0 in Study A |
psi |
hypothesized value for the treatment effect at time t; optional (user must provide either (1) data from treatment arm in Study A or (2) hypothesized values for delta.ea (or R.A.given) and psi or (3) data from treatment arm in Study A and hypothesized psi (if different from observed treatment effect at t in Study A)), if not given then it is assumed that this quantity equals the osberved treatment effect at time t in Study A |
R.A.given |
hypothesized value for the proportion of treatment effect on the primary outcome explained by surrogate information at t0 in Study A; optional (user must provide either (1) data from treatment arm in Study A or (2) hypothesized values for delta.ea (or R.A.given) and psi or (3) data from treatment arm in Study A and hypothesized psi (if different from observed treatment effect at t in Study A)) |
t |
time of interest |
landmark |
landmark time of interest, t0 |
extrapolate |
TRUE or FALSE; indicates whether local constant extrapolation should be used, default is TRUE |
adjustment |
TRUE or FALSE; indicates whether adjustment that is needed when survival past time t is high should be used, default is FALSE if survival past t0 is < 0.90 in both arms arm of Study A, otherwise default is true if survival past t0 is >= 0.90 in either arm of Study A |
n |
total sample size for future study (Study B); optional (user needs to provide either n or power) |
power |
desired power for testing at time t0 for future study (Study B); optional (user needs to provide either n or power) |
pi.1 |
proportion of total sample size in future study (Study B) that would be assigned to the treatment group, default is 0.5 |
pi.0 |
proportion of total sample size in future study (Study B) that would be assigned to the treatment group, default is 0.5 |
cens.rate |
censoring in the future study (Study B) is assumed to follow an exponential distribution with censoring rate equal to this specificed value |
transform |
TRUE or FALSE; indicates whether a transformation should be used, default is FALSE. |
Details
Assume information is available on a prior study, Study A, examining the effectiveness of a treatment up to some time of interest, t. The aim is to plan a future study, Study B, that would be conducted only up to time t_0<t
and a test for a treatment effect would occur at t_0
. In both studies, we assume a surrogate marker is/will be measured at time t_0
for individuals still observable at t_0
. Let G
be the binary treatment indicator with G=1
for treatment and G=0
for control and we assume throughout that subjects are randomly assigned to a treatment group at baseline. Let T_K^{(1)}
and T_K^{(0)}
denote the time of the primary outcome of interest, death for example, under the treatment and under the control, respectively, in Study K. Let S_K^{(1)}
and S_K^{(0)}
denote the surrogate marker measured at time t_0
under the treatment and the control, respectively, in Study K.
The null and alternative hypotheses of interest are:
H_0: \Delta_B(t) \equiv P(T_B^{(1)}>t) - P(T_B^{(0)}>t) = 0
H_1: \Delta_B(t) = \psi >0
Here, we plan to test H_0
in Study B using the test statistic
Z_{EB}(t,t_0) = \sqrt{n_B}\frac{\hat{\Delta}_{EB}(t,t_0)}{\hat{\sigma}_{EB}(t,t_0)}
(see early.delta.test documentation). The estimated power at a type I error rate of 0.05 is thus
1 - \Phi \left\{1.96 - \frac{\sqrt{n_B}\hat{R}_{SA}(t, t_0)\psi }{ \hat{\sigma}_{EB0}(t,t_0\mid \hat{r}_A^{(0)}, W_{B}^{C})} \right \}
where \hat{R}_{SA}(t,t_0) =\hat{\Delta}_{EA}(t,t_0)/\hat{\Delta}_A(t)
, and
\hat{\Delta}_A(t)=n_{A1}^{-1}\sum_{i=1}^{n_{A1}}\frac{I(X_{Ai}^{(1)}>t)}{\hat{W}_{A1}^C(t)}-n_{A0}^{-1}\sum_{i=1}^{n_{A0}}\frac{I(X_{Ai}^{(0)}>t)}{\hat{W}_{A0}^C(t)},
and \hat{\Delta}_{EA}(t,t_0)
is parallel to \hat{\Delta}_{EB}(t,t_0)
except replacing
n_{A0}^{-1} \sum_{i=1}^{n_{A0}} \hat{r}_A^{(0)}(t|S_{Ai}^{(0)}, t_0) \frac{I(X_{Ai}^{(0)} > t_0)}{\hat{W}_{A0}^C(t_0)}
by n_{A0}^{-1}\sum_{i=1}^{n_{A0}}\hat{W}_{A0}^C(t)^{-1}I(X_{Ai}^{(0)}>t),
and \hat{W}^C_{Ag}(\cdot)
is the Kaplan-Meier estimator of the survival function for C_{A}^{(g)}
for g=0,1
. In addition, \hat{\sigma}_{EB0}(t, t_0| \hat{r}_A^{(0)}, W_{B}^{C})^2 =
\frac{1}{\pi_{B0}\pi_{B1}}\left[ \frac{\hat\mu_{AB2}^{(0)}(t, t_0, \mid \hat r_A^{(0)})}{W_{B}^{C}(t_0)}-\hat\mu_{AB1}^{(0)}(t, t_0, \mid \hat r_A^{(0)})^2\left\{1+\int_0^{t_0}\frac{\lambda_{B}^{C}(u)du}{\hat{W}_{A0}^{T}(u)W_{B}^{C}(u)}\right\}\right]
assuming that the survival function of the censoring distribution is W_{B}^{C}(t)
in both arms, where \pi_{Bg}=n_{Bg}/n_B
and \hat{W}_{A0}^{T}(\cdot)
is the Kaplan-Meier estimator of the survival function of T_A^{(0)}
based on the observations from Study A, and
\hat\mu_{ABm}^{(0)}(t, t_0, \mid \hat r_A^{(0)})=n_{A0}^{-1}\sum_{i=1}^{n_{A0}}\frac{\hat{r}_A^{(0)}(t|S_{Ai}^{(0)}, t_0)^mI(X_{Ai}^{(0)}>t_0)}{\hat{W}_{A0}^{C}(t_0)}
where \hat{r}_A^{(0)}(t|s, t_0)
is provided in the early.delta.test documentation.
This can be re-arranged to calculate the sample size needed in Study B to achieve a power of 100(1-\beta)\%
:
n_B=\left \{ \hat{\sigma}_{EB0}(t,t_0\mid \hat{r}_A^{(0)},W_{B}^{C}) \left (\frac{1.96 - \Phi^{-1}(\beta)}{\hat{R}_{SA}(t,t_0)\psi } \right ) \right \}^2.
When the outcome rate is low (i.e., survival rate at t is high), an adjustment to the variance calculation is needed. This is automatically implemented if the survival rate at t in either arm is 0.90 or higher.
Value
n |
Total sample size needed for Study B at the given power (if power is provided by user). |
power |
Estimated power for Study B at the given sample size (if sample size is provided by user). |
Author(s)
Layla Parast
References
Parast L, Cai T, Tian L (2019). Using a Surrogate Marker for Early Testing of a Treatment Effect. Biometrics, 75(4):1253-1263.
Examples
data(dataA)
design.study(Axzero = dataA$x0, Adeltazero = dataA$delta0, Aszero = dataA$s0,
Axone = dataA$x1, Adeltaone = dataA$delta1, Asone = dataA$s1, t=1, landmark=0.5,
power = 0.80, cens.rate=0.5)
design.study(Axzero = dataA$x0, Adeltazero = dataA$delta0, Aszero = dataA$s0,
Axone = dataA$x1, Adeltaone = dataA$delta1, Asone = dataA$s1, t=1, landmark=0.5,
n=2500, cens.rate=0.5)
design.study(Axzero = dataA$x0, Adeltazero = dataA$delta0, Aszero = dataA$s0,
Axone = dataA$x1, Adeltaone = dataA$delta1, Asone = dataA$s1, t=1, landmark=0.5,
power = 0.80, cens.rate=0.5, psi = 0.05)
Estimate and test the early treatment effect
Description
Estimates the early treatment effect estimate and provides two versions of the standard error; tests the null hypothesis that this treatment effect is equal to 0
Usage
early.delta.test(Axzero, Adeltazero, Aszero, Bxzero, Bdeltazero, Bszero, Bxone,
Bdeltaone, Bsone, t, landmark, perturb = T, extrapolate = T, transform = F)
Arguments
Axzero |
observed event times in the control group in Study A |
Adeltazero |
event/censoring indicators in the control group in Study A |
Aszero |
surrogate marker values in the control group in Study A, NA for individuals not observable at the time the surrogate marker was measured |
Bxzero |
observed event times in the control group in Study B |
Bdeltazero |
event/censoring indicators in the control group in Study B |
Bszero |
surrogate marker values in the control group in Study B, NA for individuals not observable at the time the surrogate marker was measured |
Bxone |
observed event times in the treatment group in Study B |
Bdeltaone |
event/censoring indicators in the treatment group in Study B |
Bsone |
surrogate marker values in the treatment group in Study B, NA for individuals not observable at the time the surrogate marker was measured |
t |
time of interest |
landmark |
landmark time of interest, t0 |
perturb |
TRUE or FALSE; indicates whether the standard error estimate obtained using perturbation resampling should be calculated |
extrapolate |
TRUE or FALSE; indicates whether local constant extrapolation should be used, default is TRUE |
transform |
TRUE or FALSE; indicates whether a transformation should be used, default is FALSE. |
Details
Assume there are two randomized studies of a treatment effect, a prior study (Study A) and a current study (Study B). Study A was completed up to some time t, while Study B was stopped at time t_0<t
. In both studies, a surrogate marker was measured at time t_0
for individuals still observable at t_0
. Let G
be the binary treatment indicator with G=1
for treatment and G=0
for control and we assume throughout that subjects are randomly assigned to a treatment group at baseline. Let T_K^{(1)}
and T_K^{(0)}
denote the time of the primary outcome of interest, death for example, under the treatment and under the control, respectively, in Study K. Let S_K^{(1)}
and S_K^{(0)}
denote the surrogate marker measured at time t_0
under the treatment and the control, respectively, in Study K.
The treatment effect quantity of interest, \Delta_K(t)
, is the difference in survival rates by time t
under treatment versus control,
\Delta_K(t)=E\{ I(T_K^{(1)}>t)\} - E\{I(T_K^{(0)}>t)\} = P(T_K^{(1)}>t) - P(T_K^{(0)}>t)
where t>t_0
. Here, we estimate an early treatment effect quantity using surrogate marker information defined as,
\Delta_{EB}(t,t_0) = P( T_B^{(1)} > t_0) \int r(t|s,t_0) dF_B^{(1)} (s|t_0) - P( T_B^{(0)} > t_0) \int r(t|s,t_0) dF_B^{(0)} (s|t_0)
where r(t|s,t_0) = P(T_{A}^{(0)} > t | T_{A}^{(0)} > t_0, S_{A}^{(0)}=s)
and F_B^{(g)}(s|t_0) = P(S_B^{(g)} \le s \mid T_B^{(g)} > t_0)
.
To test the null hypothesis that \Delta_B(t) = 0
, we test the null hypothesis \Delta_{EB}(t,t_0) = 0
using the test statistic
Z_{EB}(t,t_0) = \sqrt{n_B}\frac{\hat{\Delta}_{EB}(t,t_0)}{\hat{\sigma}_{EB}(t,t_0)}
where \hat{\Delta}_{EB}(t,t_0)
is a consistent estimate of \Delta_{EB}(t,t_0)
and \hat{\sigma}_{EB}(t,t_0)
is the estimated standard error of \sqrt{n_B}\{\hat{\Delta}_{EB}(t,t_0)-\Delta_{EB}(t, t_0)\}.
We reject the null hypothesis when |Z_{EB}(t,t_0) | > \Phi^{-1}(1-\alpha/2)
where \alpha
is the Type 1 error rate.
To obtain \hat{\Delta}_{EB}(t,t_0)
, we use
\hat{\Delta}_{EB}(t,t_0) = n_{B1}^{-1} \sum_{i=1}^{n_{B1}} \hat{r}_A^{(0)}(t|S_{Bi}^{(1)}, t_0) \frac{I(X_{Bi}^{(1)} > t_0)}{\hat{W}_{B1}^C(t_0)} - n_{B0}^{-1} \sum_{i=1}^{n_{B0}} \hat{r}_A^{(0)}(t|S_{Bi}^{(0)}, t_0) \frac{I(X_{Bi}^{(0)} > t_0)}{\hat{W}_{B0}^C(t_0)}
where \hat{W}^C_{k g}(u)
is the Kaplan-Meier estimator of W_{k g}^{C}(u)=P(C_{k}^{(g)} > u)
and
\hat{r}_A^{(0)}(t|s,t_0) = \exp\{-\hat{\Lambda}_A^{(0)}(t\mid s,t_0) \}
, where
\hat{\Lambda}_A^{(0)}(t \mid t_0,s) = \int_{t_0}^t \frac{\sum_{i=1}^{n_{A0}} I(X_{Ai}^{(0)}>t_0) K_h\{\gamma(S_{Ai}^{(0)}) - \gamma(s)\}dN_{Ai}^{(0)} (z)}{\sum_{i=1}^{n_{A0}} K_h\{\gamma(S_{Ai}^{(0)}) - \gamma(s)\} Y_{Ai}^{(0)}(z)}
is a consistent estimate of \Lambda_A^{(0)}(t\mid t_0,s ) = -\log [r_A^{(0)}(t\mid t_0,s)],
Y_{Ai}^{(0)}(t) = I(X_{Ai}^{(0)} \geq t)
, N_{Ai}^{(0)}(t) = I(X_{Ai}^{(0)} \leq t) \delta_{Ai}^{(0)}, K(\cdot)
is a smooth symmetric density function, K_h(x) = K(x/h)/h
and \gamma(\cdot)
is a given monotone transformation function. For the bandwidth h
, we require the standard undersmoothing assumption of h=O(n_g^{-\gamma})
with \gamma \in (1/4,1/2)
in order to eliminate the impact of the bias of the conditional survival function on the resulting estimator.
The quantity \hat{\sigma}_{EB}(t,t_0)
is obtained using either a closed form expression under the null or a perturbation resampling approach. If a confidence interval is desired, perturbation resampling is required.
Value
delta.eb |
The estimate early treatment effect, |
se.closed |
The standard error estimate of the early treatment effect using the closed form expression under the null. |
Z.closed |
The test statistic using the closed form standard error expression. |
p.value.closed |
The p-value using the closed form standard error expression. |
conf.closed.norm |
The confidence interval for the early treatment effect, using a normal approximation and using the closed form standard error expression. |
se.perturb |
The standard error estimate of the early treatment effect using perturbation resampling, if perturb = T. |
Z.perturb |
The test statistic using the perturbed standard error estimate, if perturb = T. |
p.value.perturb |
The p-value using the perturbed standard error estimate, if perturb = T. |
conf.perturb.norm |
The confidence interval for the early treatment effect, using a normal approximation and using the perturbed standard error expression, if perturb = T. |
delta.eb.CI |
The confidence interval for the early treatment effect, using the quantiles of the perturbed estimates, if perturb = T. |
Author(s)
Layla Parast
References
Parast L, Cai T, Tian L (2019). Using a Surrogate Marker for Early Testing of a Treatment Effect. Biometrics, 75(4):1253-1263.
Examples
data(dataA)
data(dataB)
early.delta.test(Axzero = dataA$x0, Adeltazero = dataA$delta0, Aszero = dataA$s0,
Bxzero = dataB$x0, Bdeltazero = dataB$delta0, Bszero = dataB$s0, Bxone = dataB$x1,
Bdeltaone = dataB$delta1, Bsone = dataB$s1, t=1, landmark=0.5, perturb = FALSE,
extrapolate = TRUE)
early.delta.test(Axzero = dataA$x0, Adeltazero = dataA$delta0, Aszero = dataA$s0,
Bxzero = dataB$x0, Bdeltazero = dataB$delta0, Bszero = dataB$s0, Bxone = dataB$x1,
Bdeltaone = dataB$delta1, Bsone = dataB$s1, t=0.75, landmark=0.5, perturb = FALSE,
extrapolate = TRUE)
early.delta.test(Axzero = dataA$x0, Adeltazero = dataA$delta0, Aszero = dataA$s0,
Bxzero = dataB$x0, Bdeltazero = dataB$delta0, Bszero = dataB$s0, Bxone = dataB$x1,
Bdeltaone = dataB$delta1, Bsone = dataB$s1, t=1, landmark=0.5, perturb = TRUE,
extrapolate = TRUE)
Helper function
Description
Helper function; should not be called directly by user.
Usage
helper.si(yy,FUN,Yi,Vi=NULL)
Arguments
yy |
yy |
FUN |
FUN |
Yi |
Yi |
Vi |
Vi |
Value
out |
matrix |
Author(s)
Layla Parast
Helper function
Description
Helper function; should not be called directly by user.
Usage
int.hazc(landmark, delta, x)
Arguments
landmark |
landmark |
delta |
delta |
x |
x |
Value
value
Author(s)
Layla Parast
Helper function
Description
Helper function; should not be called directly by user.
Usage
int.hazc.plan(landmark, delta, x, cens.rate, B = 10000)
Arguments
landmark |
landmark |
delta |
delta |
x |
x |
cens.rate |
cens.rate |
B |
B |
Value
value
Author(s)
Layla Parast
Calculates the conditional probability of survival to time t
Description
Helper function; calculates the estimated conditional probability of survival to time t given survival to the landmark time and given surrogate marker information.
Usage
pred.smooth.surv.new(Axzero.f, Adeltazero.f, Aszero.f, Bsnew.f,
Bsnew2.f = NULL, myt, bw = NULL, weight.pred, extrapolate)
Arguments
Axzero.f |
observed event times in the control group in Study A |
Adeltazero.f |
event/censoring indicators in the control group in Study A |
Aszero.f |
surrogate marker values in the control group in Study A, NA for individuals not observable at the time the surrogate marker was measured |
Bsnew.f |
surrogate marker values in one group (either treatment or control) in Study B |
Bsnew2.f |
surrogate marker values in one group (either treatment or control) in Study B, optional |
myt |
time of interest |
bw |
bandwidth, optional |
weight.pred |
weight used for perturbation resampling |
extrapolate |
TRUE or FALSE; indicates whether local constant extrapolation should be used |
Details
Details are included in the documentation for early.delta.test
Value
conditional probability of survival past t
Author(s)
Layla Parast
Recover an estimate of the treatment effect at time t in Study B
Description
Recover an estimate of the treatment effect at time t in Study B
Usage
recover.B(Axzero, Adeltazero, Aszero, Axone, Adeltaone, Asone, Bxzero, Bdeltazero,
Bszero, Bxone, Bdeltaone, Bsone, t, landmark, extrapolate = T, transform = F)
Arguments
Axzero |
observed event times in the control group in Study A |
Adeltazero |
event/censoring indicators in the control group in Study A |
Aszero |
surrogate marker values in the control group in Study A, NA for individuals not observable at the time the surrogate marker was measured |
Axone |
observed event times in the treatment group in Study A |
Adeltaone |
event/censoring indicators in the treatment group in Study A |
Asone |
surrogate marker values in the treatment group in Study A, NA for individuals not observable at the time the surrogate marker was measured |
Bxzero |
observed event times in the control group in Study B |
Bdeltazero |
event/censoring indicators in the control group in Study B |
Bszero |
surrogate marker values in the control group in Study B, NA for individuals not observable at the time the surrogate marker was measured |
Bxone |
observed event times in the treatment group in Study B |
Bdeltaone |
event/censoring indicators in the treatment group in Study B |
Bsone |
surrogate marker values in the treatment group in Study B, NA for individuals not observable at the time the surrogate marker was measured |
t |
time of interest |
landmark |
landmark time of interest, t0 |
extrapolate |
TRUE or FALSE; indicates whether local constant extrapolation should be used, default is TRUE |
transform |
TRUE or FALSE; indicates whether a transformation should be used, default is FALSE |
Details
Assume there are two randomized studies of a treatment effect, a prior study (Study A) and a current study (Study B). Study A was completed up to some time t, while Study B was stopped at time t_0<t
. In both studies, a surrogate marker was measured at time t_0
for individuals still observable at t_0
. Let G
be the binary treatment indicator with G=1
for treatment and G=0
for control and we assume throughout that subjects are randomly assigned to a treatment group at baseline. Let T_K^{(1)}
and T_K^{(0)}
denote the time of the primary outcome of interest, death for example, under the treatment and under the control, respectively, in Study K. Let S_K^{(1)}
and S_K^{(0)}
denote the surrogate marker measured at time t_0
under the treatment and the control, respectively, in Study K.
The treatment effect quantity of interest, \Delta_K(t)
, is the difference in survival rates by time t
under treatment versus control,
\Delta_K(t)=E\{ I(T_K^{(1)}>t)\} - E\{I(T_K^{(0)}>t)\} = P(T_K^{(1)}>t) - P(T_K^{(0)}>t)
where t>t_0
. Here, we recover an estimate of \Delta_B(t)
using Study B information (which stopped follow-up at time t_0<t
) and Study A information (which has follow-up information through time t). The estimate is obtained as
\hat{\Delta}_{EB}(t,t_0)/ \hat{R}_{SA}(t,t_0)
where \hat{\Delta}_{EB}(t,t_0)
is the early treatment effect estimate in Study B, described in the early.delta.test documention, and \hat{R}_{SA}(t,t_0)
is the proportion of treatment effect explained by the surrogate marker information at t_0
in Study A. This proportion is calculated as \hat{R}_{SA}(t,t_0) =\hat{\Delta}_{EA}(t,t_0)/\hat{\Delta}_A(t)
where
\hat{\Delta}_A(t)=n_{A1}^{-1}\sum_{i=1}^{n_{A1}}\frac{I(X_{Ai}^{(1)}>t)}{\hat{W}_{A1}^C(t)}-n_{A0}^{-1}\sum_{i=1}^{n_{A0}}\frac{I(X_{Ai}^{(0)}>t)}{\hat{W}_{A0}^C(t)},
and \hat{\Delta}_{EA}(t,t_0)
is parallel to \hat{\Delta}_{EB}(t,t_0)
except replacing
n_{A0}^{-1} \sum_{i=1}^{n_{A0}} \hat{r}_A^{(0)}(t|S_{Ai}^{(0)}, t_0) \frac{I(X_{Ai}^{(0)} > t_0)}{\hat{W}_{A0}^C(t_0)}
by n_{A0}^{-1}\sum_{i=1}^{n_{A0}}\hat{W}_{A0}^C(t)^{-1}I(X_{Ai}^{(0)}>t),
and \hat{W}^C_{Ag}(\cdot)
is the Kaplan-Meier estimator of the survival function for C_{A}^{(g)}
for g=0,1
.
Perturbation resampling is used to provide a standard error estimate for the estimate of \Delta_B(t)
and a confidence interval.
Value
recovered.deltaB |
The recovered estimate of |
sd.recovered.deltaB |
The standard error estimate of the recovered estimate of |
conf.quantile.recovered.deltaB |
A confidence interval for the recovered estimate of |
Author(s)
Layla Parast
References
Parast L, Cai T, Tian L (2019). Using a Surrogate Marker for Early Testing of a Treatment Effect. Biometrics, In press.
Parast L, Cai T and Tian L (2017). Evaluating Surrogate Marker Information using Censored Data. Statistics in Medicine, 36(11): 1767-1782.
Examples
data(dataA)
data(dataB)
recover.B(Axzero = dataA$x0, Adeltazero = dataA$delta0, Aszero = dataA$s0, Axone
= dataA$x1, Adeltaone = dataA$delta1, Asone = dataA$s1, Bxzero = dataB$x0, Bdeltazero
= dataB$delta0, Bszero = dataB$s0, Bxone = dataB$x1, Bdeltaone = dataB$delta1, Bsone
= dataB$s1, t=1, landmark=0.5, extrapolate = TRUE)
recover.B(Axzero = dataA$x0, Adeltazero = dataA$delta0, Aszero = dataA$s0, Axone
= dataA$x1, Adeltaone = dataA$delta1, Asone = dataA$s1, Bxzero = dataB$x0, Bdeltazero
= dataB$delta0, Bszero = dataB$s0, Bxone = dataB$x1, Bdeltaone = dataB$delta1, Bsone
= dataB$s1, t=0.75, landmark=0.5, extrapolate = TRUE)
Variance estimation
Description
Variance estimation, generally not called directly by the user
Usage
var.delta.eb(Axzero, Adeltazero, Aszero, Bxone, Bdeltaone,
Bsone, Bxzero, Bdeltazero, Bszero, t, landmark = landmark,
extrapolate)
Arguments
Axzero |
observed event times in the control group in Study A |
Adeltazero |
event/censoring indicators in the control group in Study A |
Aszero |
surrogate marker values in the control group in Study A, NA for individuals not observable at the time the surrogate marker was measured |
Bxone |
observed event times in the treatment group in Study B |
Bdeltaone |
event/censoring indicators in the treatment group in Study B |
Bsone |
surrogate marker values in the treatment group in Study B, NA for individuals not observable at the time the surrogate marker was measured |
Bxzero |
observed event times in the control group in Study B |
Bdeltazero |
event/censoring indicators in the control group in Study B |
Bszero |
surrogate marker values in the control group in Study B, NA for individuals not observable at the time the surrogate marker was measured |
t |
time of interest |
landmark |
landmark time of interest, t0 |
extrapolate |
TRUE or FALSE; indicates whether local constant extrapolation should be used, default is TRUE |
Details
Variance estimation using the closed form expression under the null hypothesis of no treatment effect; more details are included in the documentation for early.delta.test.
Value
Variance estimate for \sqrt{n_{B}}\hat{\Delta}_{EB}(t,t_0)
Author(s)
Layla Parast
References
Parast L, Cai T, Tian L (2019). Using a Surrogate Marker for Early Testing of a Treatment Effect. Biometrics, 75(4):1253-1263.
Examples
data(dataA)
data(dataB)
var.delta.eb(Axzero = dataA$x0, Adeltazero = dataA$delta0,
Aszero = dataA$s0, Bxone = dataB$x1, Bdeltaone = dataB$delta1,
Bsone = dataB$s1, Bxzero = dataB$x0, Bdeltazero = dataB$delta0,
Bszero = dataB$s0, t=1, landmark=0.5, extrapolate = TRUE)