Type: | Package |
Title: | Assessing Heterogeneity in Surrogacy Using Censored Data |
Version: | 1.0 |
Date: | 2024-08-18 |
Description: | Provides functions to assess and test for heterogeneity in the utility of a surrogate marker with respect to a baseline covariate using censored (survival data), and to test for heterogeneity across multiple time points. More details are available in Parast et al (2024) <doi:10.1002/sim.10122>. |
License: | GPL-2 | GPL-3 [expanded from: GPL] |
Imports: | stats, Rsurrogate, MASS, groc |
NeedsCompilation: | no |
Packaged: | 2024-08-23 11:11:25 UTC; parastlm |
Author: | Layla Parast [aut, cre] |
Maintainer: | Layla Parast <parast@austin.utexas.edu> |
Depends: | R (≥ 3.5.0) |
Repository: | CRAN |
Date/Publication: | 2024-08-28 08:10:09 UTC |
Estimates the proportion of treatment effect explained by the surrogate marker as a function of a baseline covariate
Description
Assesses heterogeneity in the utility of a surrogate marker with respect to a baseline covariate using censored (survival data) by estimates the proportion of treatment effect explained by the surrogate marker as a function of a baseline covariate, w
Usage
R.main.estimate(xone, xzero, deltaone, deltazero, sone, szero, wone, wzero, w.grd, myt,
landmark, type = "cont", var = FALSE, test = FALSE, extrapolate = TRUE, h.0 = NULL,
h.1 = NULL, h.w = NULL, h.s = NULL, h.w.1 = NULL)
Arguments
xone |
x1, observed event time in the treated group |
xzero |
x0, observed event time in the control group |
deltaone |
delta1, event indicator in the treated group |
deltazero |
delta0, event indicator in the control group |
sone |
s1, surrogate marker in the treated group |
szero |
s0, surrogate marker in the control group |
wone |
w1, baseline covariate in the treated group |
wzero |
w0, baseline covariate in the control group |
w.grd |
grid for w where estimation will be provided |
myt |
t of interest |
landmark |
t0, landmark time |
type |
options are "cont" or "discrete"; type of baseline covariate, default is "cont" |
var |
TRUE or FALSE, if variance/standard error estimates are wanted |
test |
TRUE or FALSE, if test for heterogeneity is wanted wanted |
extrapolate |
TRUE or FALSE |
h.0 |
bandwidth |
h.1 |
bandwidth |
h.w |
bandwidth |
h.s |
bandwidth |
h.w.1 |
bandwidth |
Value
A list is returned:
w.values |
grid for w where estimation is provided |
R.s.w |
The propoportion of treatment effect explained as a function of the baseline covariate, w |
delta.w |
The treatment effect as a function of the baseline covariate, w |
delta.s.w |
The residual treatment effect as a function of the baseline covariate, w |
sd.R |
Standard error estimate of R.s.w |
sd.delta |
Standard error estimate of delta.w |
sd.delta.s |
Standard error estimate of delta.s.w |
pval.omnibus |
p-value from the omnibus test for heterogeneity |
pval.con |
p-value from the conservative omnibus test for heterogeneity |
Author(s)
Layla Parast
References
Parast L, Tian L, Cai, T. (2024) "Assessing Heterogeneity in Surrogacy Using Censored Data." Statistics in Medicine, 43(17): 3184-3209.
Examples
data(example.data)
names(example.data)
R.main.estimate(xone=example.data$x1, xzero=example.data$x0, deltaone=example.data$d1,
deltazero=example.data$d0, sone=log(example.data$s1), szero=log(example.data$s0),
wone=log(example.data$w1), wzero=log(example.data$w0),
w.grd=log(seq(0.1,0.9, length=25)), myt=1, landmark=0.5)
R.main.estimate(xone=example.data$x1, xzero=example.data$x0, deltaone=example.data$d1,
deltazero=example.data$d0, sone=log(example.data$s1), szero=log(example.data$s0),
wone=example.data$w1_cat, wzero=example.data$w0_cat,
myt=1, landmark=0.5,type = "discrete", w.grd = c(1,2,3,4))
#computationally intensive
R.main.estimate(xone=example.data$x1, xzero=example.data$x0, deltaone=example.data$d1,
deltazero=example.data$d0, sone=log(example.data$s1), szero=log(example.data$s0),
wone=log(example.data$w1), wzero=log(example.data$w0),
w.grd=log(seq(0.1,0.9, length=25)), myt=1, landmark=0.5, test=TRUE)
Estimates the propoportion of treatment effect explained as a function of a baseline covariate, w
Description
Estimates the propoportion of treatment effect explained as a function of a baseline covariate, w
Usage
R.surv.s.w(xone, xzero, deltaone, deltazero, sone, szero, wone, wzero, w.grd,
myt, landmark, extrapolate = TRUE, h.0 = NULL, h.1 = NULL, h.w = NULL,
h.s = NULL, h.w.1 = NULL)
Arguments
xone |
x1 |
xzero |
x0 |
deltaone |
delta1 |
deltazero |
delta0 |
sone |
s1 |
szero |
s0 |
wone |
w1 |
wzero |
w0 |
w.grd |
grid for w |
myt |
t of interest |
landmark |
landmark time |
extrapolate |
TRUE or FALSE |
h.0 |
bandwidth |
h.1 |
bandwidth |
h.w |
bandwidth |
h.s |
bandwidth |
h.w.1 |
bandwidth |
Value
A list with the following components:
R.s.w |
The propoportion of treatment effect explained as a function of the baseline covariate, w |
delta.w |
The treatment effect as a function of the baseline covariate, w |
delta.s.w |
The residual treatment effect as a function of the baseline covariate, w |
Calculates robust residual treatment effect accounting for surrogate marker information measured at a specified time and primary outcome information up to that specified time
Description
This function calculates the robust estimate of the residual treatment effect accounting for surrogate marker information measured at t_0
and primary outcome information up to t_0
i.e. the hypothetical treatment effect if both the surrogate marker distribution at t_0
and survival up to t_0
in the treatment group look like the surrogate marker distribution and survival up to t_0
in the control group. Ideally this function is only used as a helper function and is not directly called.
Usage
delta.s.surv.estimate.new(xone, xzero, deltaone, deltazero, sone, szero, t,
weight.perturb = NULL, landmark, extrapolate = FALSE, transform = FALSE,
approx = TRUE, warn.te = FALSE, warn.support = 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. |
sone |
numeric vector; surrogate marker measurement at |
szero |
numeric vector; surrogate marker measurement at |
t |
the time of interest. |
weight.perturb |
weights used for perturbation resampling. |
landmark |
the landmark time |
extrapolate |
TRUE or FALSE; indicates whether the user wants to use extrapolation. |
transform |
TRUE or FALSE; indicates whether the user wants to use a transformation for the surrogate marker. |
approx |
TRUE or FALSE indicating whether an approximation should be used when calculating the probability of censoring; most relevant in settings where the survival time of interest for the primary outcome is greater than the last observed event but before the last censored case, default is TRUE. |
warn.te |
value passed from R.s.estimate function to control warnings; user does not need to specify. |
warn.support |
value passed from R.s.estimate function to control warnings; user does not need to specify. |
Details
Details are included in the documentation for R.s.surv.estimate.
Value
\hat{\Delta}_S(t,t_0)
, the robust residual treatment effect estimate accounting for surrogate marker information measured at t_0
and primary outcome information up to t_0
.
References
Parast, L., Cai, T., & Tian, L. (2017). Evaluating surrogate marker information using censored data. Statistics in Medicine, 36(11), 1767-1782.
Example data
Description
Example data
Usage
data("example.data")
Format
A list with 10 elements representing 2000 observations from a treatment group and 1500 observations from a control group:
s1
the surrogate marker in the treatment group
s0
the surrogate marker in the control group
w1
the baseline covariate of interest in the treatment group
w0
the baseline covariate of interest in the control group
d1
the event indicator in the treatment group
d0
the event indicator in the control group
x1
the observed event time in the treatment group
x0
the observed evenet time in the control group
w1_cat
the discrete baseline covariate of interest in the treatment group
w0_cat
the discrete baseline covariate of interest in the treatment group
Examples
data(example.data)
names(example.data)
Estimates P(T>t|W=w)
Description
Estimates P(T>t|W=w)
Usage
pred.smooth.surv.w(x.ref, delta.ref, w.ref, w.apply, myt, extrapolate = TRUE,
h.use = NULL, warn.support = FALSE)
Arguments
x.ref |
x reference |
delta.ref |
delta reference |
w.ref |
w reference |
w.apply |
w to apply estimate to |
myt |
time of interest |
extrapolate |
TRUE or FALSE |
h.use |
bandwidth |
warn.support |
TRUE or FALSE |
Value
Conditional survival estimates
Estimates P(T>t|T>t_0, S=s, W=w)
Description
Estimates P(T>t|T>t_0, S=s, W=w)
Usage
pred.smooth.surv.w.s(x.ref, delta.ref, w.ref, s.ref, w.apply, s.apply, h.s, h.w,
myt, extrapolate = TRUE, kerni.ss.s, tmpind, tj)
Arguments
x.ref |
x reference |
delta.ref |
delta reference |
w.ref |
w reference |
s.ref |
s reference |
w.apply |
w to apply estimate to |
s.apply |
s to apply estimate to |
h.s |
bandwidth |
h.w |
bandwidth |
myt |
time of interest |
extrapolate |
TRUE or FALSE |
kerni.ss.s |
kernel matrix |
tmpind |
temporary indicator |
tj |
temporary tj |
Value
Conditional survival estimate
Tests for heterogeneity across multiple timepoints
Description
Tests for heterogeneity across multiple timepoints
Usage
test.multiplet(t.mult, xone, xzero, deltaone, deltazero, sone, szero, wone,
wzero, w.grd, landmark, extrapolate = TRUE, h.0 = NULL, h.1 = NULL, h.w = NULL,
h.s = NULL, h.w.1 = NULL,type = "cont")
Arguments
t.mult |
Vector of time points |
xone |
x1, observed event time in the treated group |
xzero |
x0, observed event time in the control group |
deltaone |
delta1, event indicator in the treated group |
deltazero |
delta0, event indicator in the control group |
sone |
s1, surrogate marker in the treated group |
szero |
s0, surrogate marker in the control group |
wone |
w1, baseline covariate in the treated group |
wzero |
w0, baseline covariate in the control group |
w.grd |
grid for w where estimation will be provided |
landmark |
t0, landmark time |
extrapolate |
TRUE or FALSE |
h.0 |
bandwidth |
h.1 |
bandwidth |
h.w |
bandwidth |
h.s |
bandwidth |
h.w.1 |
bandwidth |
type |
options are "cont" or "discrete"; type of baseline covariate, default is "cont" |
Value
A list is returned:
pval.multi |
p-value for omnibus test |
pval.con.multi |
p-value for conservative omnibus test (only applicable for continuous W) |
Author(s)
Layla Parast
References
Parast L, Tian L, Cai, T. (2024) "Assessing Heterogeneity in Surrogacy Using Censored Data." Statistics in Medicine, 43(17): 3184-3209.
Examples
data(example.data)
names(example.data)
#computationally intensive
test.multiplet(t.mult = c(1,1.25,1.5), xone=example.data$x1, xzero=example.data$x0,
deltaone=example.data$d1, deltazero=example.data$d0, sone=log(example.data$s1),
szero=log(example.data$s0), wone=log(example.data$w1), wzero=log(example.data$w0),
w.grd=log(seq(0.1,0.9, length=25)), landmark=0.5)