censor.weight: Calculates censoring probability for weighting

Description Usage Arguments Details Value Author(s) Examples

View source: R/Functions_SurrogateTest.R

Description

Helper function; calculates censoring probability needed for inverse probability of censoring weighting

Usage

1
censor.weight(data.x, data.delta, t, weight = NULL)

Arguments

data.x

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

data.delta

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.

t

number, the time of interest.

weight

a numeric vector or matrix of weights used for perturbation-resampling, default is null.

Details

Computes the Kaplan Meier estimate of survival for the censoring random variable at the specified time

Value

Kaplan Meier estimate of survival for censoring at time t

Author(s)

Layla Parast

Examples

1
2
data(dataA)
censor.weight(data.x = dataA$x1, data.delta = dataA$delta1, t=0.5)

SurrogateTest documentation built on Nov. 16, 2021, 9:10 a.m.