Package 'OSsurvival'

Title: Assessing Surrogacy with a Censored Outcome
Description: Identifies the optimal transformation of a surrogate marker and estimates the proportion of treatment explained (PTE) by the optimally-transformed surrogate at an earlier time point when the primary outcome of interest is a censored time-to-event outcome; details are described in Wang et al (2021) <doi:10.1002/sim.9185>.
Authors: Xuan Wang [aut], Clara-Lea Bonzel [aut], Tianxi Cai [aut], Layla Parast [aut, cre], PARSE LTD [aut]
Maintainer: Layla Parast <[email protected]>
License: GPL-3
Version: 1.0
Built: 2024-11-11 03:28:17 UTC
Source: https://github.com/cran/OSsurvival

Help Index


Simulated data for the example.

Description

Simulated data for the example.

Usage

data.example

Format

A data list with 5 elements:

t.0

time at which the surrogate is measured

t

time at which the primary outcome is measured

xob

observed survival time

s.ob

surrogate information at t.0

deltaob

event indicator

aob

treatment indicator


Estimates the proportion of treatment effect explained

Description

Estimates the proportion of treatment effect explained by the optimally transformed surrogate

Usage

pte.survival(xob, s.ob, deltaob, aob, t, t.0, varind = 0, re = 100)

Arguments

xob

observed survival time

s.ob

surrogate information at time t.0

deltaob

event indicator

aob

treatment indicator

t

time at which the primary outcome is measured

t.0

time at which the surrogate is measured

varind

whether to estimate variance (yes=0, no=1)

re

number of replications for resampling, if varind=0

Value

A list of the following:

pte.est

The estimated proportion of treatment effect explained (PTE) by the optimally transformed surrogate

pte.ese

Standard error estimate for the PTE, provided if var.ind=0

g1.est

Estimated g1

g1.ese

Standard error estimate for ge, provided if var.ind = 0

sgrid

Grid used for the surrogate marker, equally spaced

gs.est

Estimated g(s), optimal transformation of s, for the sgrid

gs.ese

Standard error estimate for g(s), provided if var.ind = 0

Examples

# load the data
data("sysdata")

# time at which the surrogate is measured
t.0 = data.example$t.0

# time at which the primary outcome is measured
t = data.example$t

# observed survival time
xob = data.example$data$xob

# surrogate information at t.0
s.ob = data.example$data$s.ob

# event indicator
deltaob = data.example$data$deltaob

# treatment indicator
aob = data.example$data$aob

# main estimation function
# varind: whether to estimate variance; re:number of replications for resampling
out = pte.survival(xob, s.ob, deltaob, aob, t, t.0, varind=0, re=100)

# estimated PTE
out$pte.est

# estimated g1
out$g1.est

# estimated g2(s) at equally spaced s point
plot(out$sgrid, out$gs.est, type="l", xlab = "Surrogate Marker", ylab = "Optimal Transformation")
#The PTE result indicates that this is a moderate to high surrogate marker in this setting.