wKendall: Weighted conditional Kendall's tau

View source: R/wKendall.R

wKendallR Documentation

Weighted conditional Kendall's tau

Description

This is function computes the perturbed version of the conditional Kendall's tau.

Usage

wKendall(trun, obs, delta = NULL, weights = NULL)

Arguments

trun

left truncation time satisfying trun <= obs.

obs

observed failure time, must be the same length as trun, might be right-censored.

delta

an optional 0-1 vector of censoring indicator (0 = censored, 1 = event) for obs. If this vector is not specified, cKendall assumes no censoring and all observed failure time denote events.

weights

an optional perturbation weights.

Value

A numeric value representing the weighted conditional Kendall's tau.

Examples

data(channing, package = "boot")
chan <- subset(channing, sex == "Male" & entry < exit)
## When weights is not specified, this function reduces to condKendall()
with(chan, wKendall(entry, exit, cens))
mean(replicate(1000, with(chan, wKendall(entry, exit, cens, rexp(nrow(chan))))))

tranSurv documentation built on June 8, 2025, 11:47 a.m.