indeptestDT: Testing quasi-independence between survival and truncation...

View source: R/indeptestDT.R

indeptestDTR Documentation

Testing quasi-independence between survival and truncation times

Description

This function tests for quasi-independence between the survival and truncation times. The survival and truncation times must be quasi-independent to use coxDT and cdfDT.

Usage

indeptestDT(y, l, r)

Arguments

y

vector of event times

l

vector of left truncation times

r

vector of right truncation times

Details

Testing for quasi-independence between the survival and truncation times using the conditional Kendall's tau introduced by Martin and Betensky (2005). More details are given in their paper.

Value

tau

Conditional Kendall's tau for survival time and left truncation time and survival time and right truncation time

X2

Chi-squared test statistic to test null hypothesis that survival and truncation times are quasi-independent. Default degrees of freedom (DF) is 2. If left and right truncation times perfectly correlated, DF = 1

p

p-value for null hypothesis that survival and truncation times are quasi-independent

References

Martin and Betensky (2005). Testing Quasi-Independence of Failure and Truncation Times via Conditional Kendall's Tau. JASA. 100(470):484-492.

Examples

# Generating independent survival and truncation times
set.seed(123)
y=rnorm(30); l=min(y)-abs(rnorm(30)); r=max(y)+abs(rnorm(30))

indeptestDT(y,l,r)

# Null hypothesis not rejected ==> not enough evidence to reject quasi-independence assumption

SurvTrunc documentation built on Sept. 16, 2022, 5:08 p.m.