Learn R Programming

tranSurv (version 1.1.6)

trSurvfit: Estimating survival curves via structural transformation model

Description

trSurvfit estimates survival curves under dependent truncation and independent censoring via a structural transformation model. A structural transformation model for a latent, quasi-independent 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 p-value. The marginal distribution for the truncation time and the event time are completely left unspecified.

Usage

trSurvfit(trun, obs, delta = NULL, trans = "linear", plots = FALSE,
  covariate = NULL, control = trSurv.control(), ...)

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, condKendall assumes no censoring and all observed failure time denote events.

trans

a character string specifying the transformation structure. The following are permitted:

linear

linear transformation structure,

log

log-linear transformation structure,

exp

exponential transformation structure.

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 qind.

control

controls lower and upper bounds when trans is an user specified function.

...

for future methods.

Value

The output contains the following components:

Sy

estimated survival function at the (ordered) observed points.

byTau

a list contains the estimator of transformation parameter: par is the best set of transformation parameter found; obj is the value of the inverse probability weighted Kendall's tau corresponding to 'par'.

byP

a list contains the estimator of transformation parameter: par is the best set of transformation parameter found; obj is the value of the inverse probability weighted Kendall's tau corresponding to 'par'.

qind

a data frame consists of two quasi-independent variables: trun is the transformed truncation time; obs is the corresponding uncensored failure time.

Details

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 quasi-independent from X and h(.) is a monotonic transformation function. The condition, T < X, is assumed to be satisfied. The quasi-independent truncation time, U, is obtained by inverting the test for quasi-independence by either minimizing the absolute value of the restricted inverse probability weighted Kendall's tau or maximize the corresponding p-value.

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)$$.

References

Martin E. and Betensky R. A. (2005), Testing quasi-independence of failure and truncation times via conditional Kendall's tau, Journal of the American Statistical Association, 100 (470): 484-492.

Austin, M. D. and Betensky R. A. (2014), Eliminating bias due to censoring in Kendall's tau estimators for quasi-independence of truncation and failure, Computational Statistics & Data Analysis, 73: 16-26.

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.

Examples

Run this code
# NOT RUN {
## 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 <- 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)
fit <- with(dat, trSurvfit(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[1]))$PE

fit$byP$par
fit$byP$obj
with(dat, condKendall(trun, obs, delta, method = "IPW2", a = fit$byP$par[1]))$p.value
# }

Run the code above in your browser using DataLab