aft {rstpm2} | R Documentation |
Parametric accelerated failure time model with smooth time functions
Description
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.
Usage
aft(formula, data, smooth.formula = NULL, df = 3,
tvc = NULL, cure.formula = ~1, control = list(),
init = NULL, weights = NULL, tvc.intercept = TRUE,
tvc.integrated = FALSE,
timeVar = "", time0Var = "",
cure = FALSE, mixture = FALSE, contrasts = NULL, subset = NULL, ...)
Arguments
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
|
smooth.formula |
a formula for describing the time effects for the linear predictor, excluding the baseline S_0(t*), but including time-dependent acceleration factors. The time-dependent acceleration factors can be modelled with any smooth functions. |
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 formula for describing the cure fraction. |
control |
|
init |
|
weights |
an optional vector of 'prior weights' to be used in the
fitting process. Should be |
tvc.intercept |
logical for whether to include an intercept in the time-varying acceleration factor (defaults to TRUE) |
tvc.integrated |
logical for whether the time-varying acceleration factor should be based on a integration, rather than a cumulative effect (defaults to FALSE) |
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. |
cure |
logical for whether to model for cure using a non-mixture model (default=FALSE) |
mixture |
logical for whether to model for cure using a mixture model (default=FALSE) |
contrasts |
an optional list. See the |
subset |
an optional vector specifying a subset of observations to be used in the fitting process. |
... |
additional arguments to be passed to the |
Details
The implementation extends the mle2
object from the
bbmle
package. The model inherits all of the methods from the
mle2
class.
Value
An aft-class
object that inherits from mle2-class
.
Author(s)
Mark Clements.
See Also
Examples
summary(aft(Surv(rectime,censrec==1)~hormon,data=brcancer,df=4))