Learn R Programming

SurrogateOutcome (version 1.2)

WEIGHT: Weight function

Description

Creates a matrix of weights and estimates to be used in estimation of the PTE within R.opt.event

Usage

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

Value

Returns a matrix of weights and estimates to be used in estimation of the PTE within R.opt.event

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

t.0

landmark time of interest, \(t_0\)

t

time of interest for treatment effect.

Author

Xuan Wang