Title: | Early Testing for a Treatment Effect using Surrogate Marker Information |
---|---|
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>. |
Authors: | Layla Parast |
Maintainer: | Layla Parast <[email protected]> |
License: | GPL |
Version: | 1.3 |
Built: | 2024-10-25 04:01:14 UTC |
Source: | https://github.com/cran/SurrogateTest |
Hypothetical Study A data to be used in examples; t=1 and the landmark time = 0.50.
data(dataA)
data(dataA)
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.
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.
data(dataA) names(dataA)
data(dataA) names(dataA)
Hypothetical Study B data to be used in examples; landmark time = 0.50.
data(dataB)
data(dataB)
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.
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.
data(dataB) names(dataB)
data(dataB) names(dataB)
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.
delta.estimate(xone, xzero, deltaone, deltazero, t, weight = NULL, KM = FALSE)
delta.estimate(xone, xzero, deltaone, deltazero, t, weight = NULL, KM = FALSE)
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 |
the difference in survival at time t (treatment group minus control group)
Layla Parast
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)
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
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)
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)
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. |
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 and a test for a treatment effect would occur at
. In both studies, we assume a surrogate marker is/will be measured at time
for individuals still observable at
. Let
be the binary treatment indicator with
for treatment and
for control and we assume throughout that subjects are randomly assigned to a treatment group at baseline. Let
and
denote the time of the primary outcome of interest, death for example, under the treatment and under the control, respectively, in Study K. Let
and
denote the surrogate marker measured at time
under the treatment and the control, respectively, in Study K.
The null and alternative hypotheses of interest are:
Here, we plan to test in Study B using the test statistic
(see early.delta.test documentation). The estimated power at a type I error rate of 0.05 is thus
where , and
and is parallel to
except replacing
by
and
is the Kaplan-Meier estimator of the survival function for
for
. In addition,
assuming that the survival function of the censoring distribution is in both arms, where
and
is the Kaplan-Meier estimator of the survival function of
based on the observations from Study A, and
where 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 :
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.
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). |
Layla Parast
Parast L, Cai T, Tian L (2019). Using a Surrogate Marker for Early Testing of a Treatment Effect. Biometrics, 75(4):1253-1263.
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)
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)
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
early.delta.test(Axzero, Adeltazero, Aszero, Bxzero, Bdeltazero, Bszero, Bxone, Bdeltaone, Bsone, t, landmark, perturb = T, extrapolate = T, transform = F)
early.delta.test(Axzero, Adeltazero, Aszero, Bxzero, Bdeltazero, Bszero, Bxone, Bdeltaone, Bsone, t, landmark, perturb = T, extrapolate = T, transform = F)
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. |
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 . In both studies, a surrogate marker was measured at time
for individuals still observable at
. Let
be the binary treatment indicator with
for treatment and
for control and we assume throughout that subjects are randomly assigned to a treatment group at baseline. Let
and
denote the time of the primary outcome of interest, death for example, under the treatment and under the control, respectively, in Study K. Let
and
denote the surrogate marker measured at time
under the treatment and the control, respectively, in Study K.
The treatment effect quantity of interest, , is the difference in survival rates by time
under treatment versus control,
where . Here, we estimate an early treatment effect quantity using surrogate marker information defined as,
where and
.
To test the null hypothesis that , we test the null hypothesis
using the test statistic
where is a consistent estimate of
and
is the estimated standard error of
We reject the null hypothesis when
where
is the Type 1 error rate.
To obtain , we use
where is the Kaplan-Meier estimator of
and
, where
is a consistent estimate of
,
is a smooth symmetric density function,
and
is a given monotone transformation function. For the bandwidth
, we require the standard undersmoothing assumption of
with
in order to eliminate the impact of the bias of the conditional survival function on the resulting estimator.
The quantity 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.
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. |
Layla Parast
Parast L, Cai T, Tian L (2019). Using a Surrogate Marker for Early Testing of a Treatment Effect. Biometrics, 75(4):1253-1263.
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)
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)
Recover an estimate of the treatment effect at time t in Study B
recover.B(Axzero, Adeltazero, Aszero, Axone, Adeltaone, Asone, Bxzero, Bdeltazero, Bszero, Bxone, Bdeltaone, Bsone, t, landmark, extrapolate = T, transform = F)
recover.B(Axzero, Adeltazero, Aszero, Axone, Adeltaone, Asone, Bxzero, Bdeltazero, Bszero, Bxone, Bdeltaone, Bsone, t, landmark, extrapolate = T, transform = F)
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 |
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 . In both studies, a surrogate marker was measured at time
for individuals still observable at
. Let
be the binary treatment indicator with
for treatment and
for control and we assume throughout that subjects are randomly assigned to a treatment group at baseline. Let
and
denote the time of the primary outcome of interest, death for example, under the treatment and under the control, respectively, in Study K. Let
and
denote the surrogate marker measured at time
under the treatment and the control, respectively, in Study K.
The treatment effect quantity of interest, , is the difference in survival rates by time
under treatment versus control,
where . Here, we recover an estimate of
using Study B information (which stopped follow-up at time
) and Study A information (which has follow-up information through time t). The estimate is obtained as
where is the early treatment effect estimate in Study B, described in the early.delta.test documention, and
is the proportion of treatment effect explained by the surrogate marker information at
in Study A. This proportion is calculated as
where
and is parallel to
except replacing
by
and
is the Kaplan-Meier estimator of the survival function for
for
.
Perturbation resampling is used to provide a standard error estimate for the estimate of and a confidence interval.
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 |
Layla Parast
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.
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)
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)