View source: R/aft_integrated.R
aft_integrated | R Documentation |
This implements the accelerated failure time models S_0(t exp(beta x)) and S_0(int_0^t exp(beta x(u)) du). The baseline function S_0(t*) is modelled as exp(-exp(eta_0(log(t*)))), where eta_0(log(t*)) is a linear predictor using natural splines.
aft_integrated(formula, data, df = 3,
tvc = NULL, cure.formula = formula, control = list(parscale = 1, maxit = 1000),
init = NULL, weights = NULL, nNodes = 20, timeVar = "", time0Var = "",
log.time.transform = TRUE,
reltol = 1e-08, trace = 0, cure = FALSE, mixture = FALSE,
contrasts = NULL, subset = NULL,
use.gr = TRUE, ...)
formula |
a formula object, with the response on the left of a |
data |
a data-frame in which to interpret the variables named in the
|
df |
an integer that describes the degrees of freedom for the |
tvc |
a list with the names of the time-varying coefficients. This uses natural splines
(e.g. |
cure.formula |
a rhs formula for the linear predictor for the cure fraction. Defaults to formula. |
control |
|
init |
|
weights |
an optional vector of 'prior weights' to be used in the
fitting process. Should be |
nNodes |
number of quadrature nodes for the integration. Defaults to 20. |
timeVar |
string variable defining the time variable. By default, this is determined from the survival object, however this may be ambiguous if two variables define the time. |
time0Var |
string variable to determine the entry variable; useful for when more than one data variable is used in the entry time. |
log.time.transform |
logical for whether to log-transform time when calculating the design matrix for the derivative of S_0 with respect to time. |
reltol |
relative tolerance for the model convergence |
trace |
integer for whether to provide trace information from the optim procedure |
cure |
logical for whether to model for cure (default=FALSE) |
mixture |
logical for whether to model for mixture cure (default=FALSE) |
contrasts |
an optional list. See the |
subset |
an optional vector specifying a subset of observations to be used in the fitting process. |
use.gr |
logical indicating whether to use gradients in the calculation |
... |
additional arguments to be passed to the |
The implementation extends the mle2
object from the
bbmle
package. The model inherits all of the methods from the
mle2
class.
An aft_integrated-class
object that inherits from mle2-class
.
Mark Clements.
survreg
, coxph
summary(aft_integrated(Surv(rectime,censrec==1)~hormon,data=brcancer,df=4))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.