trReg fits transformation model under dependent truncation and independent censoring via a structural transformation model.
trReg(
formula,
data,
subset,
tFun = "linear",
method = c("kendall", "adjust"),
B = 0,
control = list()
)a formula expression, of the form response ~ predictors.
The response is assumed to be a survival::Surv object with both left truncation and right censoring.
When there is no covariates, e.g., when the right hand side of the formula is ~ 1, the trReg() function returns a trSurvfit object.
See ?survival::Surv for more details.
an optional data frame in which to interpret the variables occurring
in the formula.
an optional vector specifying a subset of observations to be used in the fitting process.
a character string specifying the transformation function or a user specified function indicating the relationship between \(X\), \(T\), and \(a\).
When tFun is a character, the following are permitted:
linear transformation structure,
log-linear transformation structure,
exponential transformation structure.
a character string specifying how the transformation parameter is estimated. The available options are "kendall" and "adjust". See Details.
a numerical value specifies the bootstrap size for estimating the standard error.
When B = 0 (default), the bootstrap standard errors will not be computed.
a list of control parameters. The following arguments are allowed:
lowerThe lower bound to search for the transformation parameter; default at -1.
upperThe upper bound to search for the transformation parameter; default at 20.
tolThe tolerance used in the search for the transformation parameter; default at 0.01.
GThe number of grids used in the search for the transformation parameter; default is 50.
A smaller G could results in faster search, but might be inaccurate.
QThe number of cutpoints for the truncation time used when method = "adjust". The default is 0.
PThe number of breakpoints to divide the event times into equally spaced segmenets.
When P > 1, the latent truncation time, \(T'(a)\) will be computed in each subset.
The transformation model is then applied to the aggregated data.
aThe transformation parameter. When this is specified, the transformation model is applied based on the specified a.
When this is not specified, an optimized a will be determined by optimization one of the quasi-independence measure. See Details.
parallelan logical value indicating whether parallel computation will be applied when B > 0.
parClan integer value specifying the number of CPU cores to be used when parallel = TRUE.
The default value is half the CPU cores on the current host.
The main assumption on the structural transformation model is that it assumes there is a latent, quasi-independent truncation time that is associated with the observed dependent truncation time, the event time, and an unknown dependence parameter through a specified funciton. The structure of the transformation model is of the form: $$h(U) = (1 + a)^{-1} \times (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(\cdot)\) 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 one of the following methods:
method = "kendall"by minimizing the absolute value of the restricted inverse probability weighted Kendall's tau or maximize the corresponding \(p\)-value.
This is the same procedure used in the trSUrvfit() function.
method = "adjust"includes a function of latent truncation time, \(U\), as a covariate.
A piece-wise function is constructed based on (\(Q + 1\)) indicator functions on whether \(U\) falls in the \(Q\)th and the (\(Q+1\))th percentile,
where \(Q\) is the number of cutpoints used. See control for details.
The transformation parameter, \(a\), is then chosen to minimize the significance of the coefficient parameter.
# NOT RUN {
data(channing, package = "boot")
chan <- subset(channing, entry < exit)
trReg(Surv(entry, exit, cens) ~ sex, data = chan)
# }
Run the code above in your browser using DataLab