trReg {tranSurv} | R Documentation |
Fitting regression model via structural transformation model
Description
trReg
fits transformation model under dependent truncation and independent censoring via a structural transformation model.
Usage
trReg(formula, data, subset, tFun = "linear", method = c("kendall",
"adjust"), B = 0, control = list())
Arguments
formula |
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.
See ?survival::Surv for more details.
|
data |
an optional data.frame in which to interpret the variables occurring
in the formula .
|
subset |
an optional vector specifying a subset of observations to be used in the fitting process.
|
tFun |
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
linear transformation structure
- log
log-linear transformation structure
- exp
exponential transformation structure
|
method |
a character string specifying the underlying model. See Details.
|
B |
a numerical value specifies the bootstrap size.
When B = 0 , the bootstrap standard errors will not be computed.
|
control |
ca list of control parameters. The following arguments are allowed:
lower The lower bound to search for the transformation parameter; default at -1.
upper The upper bound to search for the transformation parameter; default at 20.
tol The tolerance used in the search for the transformation parameter; default at 0.01.
G The number of grids used in the search for the transformation parameter; default at 50.
A smaller G could results in faster search, but might be inaccurate.
Q The number of cutpoints for the truncation time used when method = "adjust" .
parallel an logical value indicating whether parallel computation will be applied when B is not 0.
parCl an 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.
|
Examples
library(survival)
data(channing, package = "boot")
chan <- subset(channing, entry < exit)
trReg(Surv(entry, exit, cens) ~ sex, data = chan)
trReg(Surv(entry, exit, cens) ~ sex, data = chan, method = "adjust", control = list(G = 10))
[Package
tranSurv version 1.2.0
Index]