Learn R Programming

SurrogateOutcome (version 1.2)

WEIGHT.p: Weight function for resampling

Description

Creates a matrix of weights and estimates to be used in estimation of the standard error of the PTE within resam

Usage

WEIGHT.p(xob, deltaob, aob, n, v, t.0, t)

Value

Returns a matrix of weights and estimates to be used in estimation of the PTE within resam

Arguments

xob

numeric vector, the observed event time: X = min(T, C) where T is the time of the primary outcome, C is the censoring time

deltaob

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

aob

numeric vector of 0/1, indicating treatment group

n

sample size

v

random exponential weight

t.0

landmark time of interest, \(t_0\)

t

time of interest for treatment effect.

Author

Xuan Wang