Description Usage Arguments Details References See Also Examples
Computes the Conditional Kendall's Tau and Inference
1 2  condKendall(trun, obs, delta = NULL, method = "MB", weights = NULL,
a = 0, trans = "linear", ...)

trun 
left truncation time satisfying 
obs 
observed failure time, must be the same length as 
delta 
an optional 01 vector of censoring indicator (0 = censored, 1 = event) for 
method 
a character string specifying the different version of conditional Kendall's tau to be computed. The following are permitted:

weights 
an optional vector of sampling weights used when 
a 
a numeric transformation parameter. The default value is 0, which applies no transformation.
This parameter must be greater than 
trans 
a character string specifying the transformation structure. The following are permitted:

... 
for future methods. 
This function performs statistical test for quasiindependence between truncation time and failure time. The hypothesis test is based on the conditional Kendall's tau of Martin and Betensky (2005) and the two versions of the inverse probability weighted Kendall's tau of Austin and Betensky (2014).
The output contains the following components:
consistent point estimate of the conditional Kendall's tau.
asymptotic standard error of the conditional Kendall's tau estimator.
the value of the normal test statistic.
the (Wald) pvalue of the test.
the transformation model (if applied).
the estimated transformation parameter.
Martin E. and Betensky R. A. (2005), Testing quasiindependence of failure and truncation times via conditional Kendall's tau, Journal of the American Statistical Association, 100 (470): 484492.
Austin, M. D. and Betensky R. A. (2014), Eliminating bias due to censoring in Kendall's tau estimators for quasiindependence of truncation and failure, Computational Statistics & Data Analysis, 73: 1626.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16  ## Generate simulated data from transformation model
datgen < function(n) {
a < 0.3
X < rweibull(n, 2, 4) ## failure times
U < rweibull(n, 2, 1) ## latent truncation time
T < (1 + a) * U  a * X ## apply transformation
C < 10 ## censoring
dat < data.frame(trun = T, obs = pmin(X, C), delta = 1 * (X <= C))
return(subset(dat, trun <= obs))
}
set.seed(123)
dat < datgen(300)
with(dat, condKendall(trun, obs, delta))
with(dat, condKendall(trun, obs, delta, method = "IPW1"))
with(dat, condKendall(trun, obs, delta, method = "IPW2"))

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.