Package 'hetsurrSurv'

Title: Assessing Heterogeneity in Surrogacy Using Censored Data
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 will be available in the future in: Parast, L., Tian L, Cai, T. (2023) "Assessing Heterogeneity in Surrogacy Using Censored Data." Under Review.
Authors: Layla Parast
Maintainer: Layla Parast <[email protected]>
License: GPL
Version: 1.0
Built: 2025-02-25 02:44:31 UTC
Source: https://github.com/laylaparast/hetsurrsurv

Help Index


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 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 = T, 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. (2023) "Assessing Heterogeneity in Surrogacy Using Censored Data." Under Review.

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)

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 = T, 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. (2023) "Assessing Heterogeneity in Surrogacy Using Censored Data." Under Review.

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)