Description Usage Arguments Details Value References Examples
A structural transformation model for a latent, quasiindependent truncation time as a function of the observed dependent truncation time and the event time, and an unknown dependence parameter. The dependence parameter is chosen to either minimize the absolute value of the restricted inverse probability weighted Kendall's tau or maximize the corresponding pvalue. The marginal distribution for the truncation time and the event time are completely left unspecified.
1 2  tranSurvfit(trun, obs, delta = NULL, trans = "linear", plots = FALSE,
covariate = NULL, control = tranSurv.control(), ...)

trun 
left truncation time, satisfying trun <= obs. 
obs 
observed failure time, must be the same length as

delta 
an optional vector of censoring indicator (0 = censored,1 = event) for obs. When this vector is not specified, the function assumes there is no censoring and all observed failure time experienced an event. 
trans 
a character string specifying the transformation
structure. The following are permitted:

plots 
an optional logical value; if TRUE, a series of diagnostic plots as well as the survival curve for the observed failure time will be plotted. 
covariate 
an optional logical value; if TRUE, covariates
will be included in the output data.frame 
control 
controls lower and upper bounds when

... 
for future methods. 
The structure of the transformation model is of the form:
h(U) = (1 + a)^1 * (h(T) + ah(X)),
where T is the truncation time, X is the observed failure time, U is the transformed truncation time that is quasiindependent from X and h(.) is a monotonic transformation function. The condition, T < X, is assumed to be satisfied. The quasiindependent truncation time, U, is obtained by inverting the test for quasiindependence by either minimizing the absolute value of the restricted inverse probability weighted Kendall's tau or maximize the corresponding pvalue.
At the current version, three transformation structures can be
specified. trans = "linear"
corresponds to h(X) = 1;
trans = "log"
corresponds to h(X) = log(X); trans =
"exp"
corresponds to h(X) = exp(X).
The output contains the following components:
Sy 
estiamted survival function at the (ordered) observed points. 
byTau 
a list contains the estimator of transformation
parameter. The following are the components:

byP 
a list contains the estimator of transformation
parameter. The following are the components:

qind 
a data frame consists of two quasiindependent variables:

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.
Chiou, S., Austin, M., Qian, J. and Betensky R. A. (2016), Transformation model estimation of survival under dependent truncation and independent censoring, an unpublished manuscript.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24  ## Generate simulated data from a 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 < rlnorm(n, .8, 1) ## 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)
fit < with(dat, tranSurvfit(trun, obs, delta))
fit
## Checking the transformation parameter
fit$byTau$par
fit$byTau$obj
with(dat, condKendall(trun, obs, delta, method = "IPW2", a = fit$byTau$par))$PE
fit$byP$par
fit$byP$obj
with(dat, condKendall(trun, obs, delta, method = "IPW2", a = fit$byP$par))$p.value

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