Skip to Content

aftreg {eha}

Accelerated Failure Time Regression
Package: 
eha
Version: 
2.2-5

Description

The accelerated failure time model with parametric baseline hazard(s). Allows for stratification with different scale and shape in each stratum, and left truncated and right censored data.

Usage

aftreg(formula = formula(data), data = parent.frame(),
na.action = getOption("na.action"), dist = "weibull", init, shape = 0,
id, param = c("default", "survreg", "canonical"),
control = list(eps = 1e-08, maxiter = 20, trace = FALSE),
singular.ok = TRUE, model = FALSE, x = FALSE, y = TRUE, center = NULL)

Arguments

formula
a formula object, with the response on the left of a ~ operator, and the terms on the right. The response must be a survival object as returned by the Surv function.
data
a data.frame in which to interpret the variables named in the formula.
na.action
a missing-data filter function, applied to the model.frame, after any subset argument has been used. Default is options()$na.action.
dist
Which distribution? Default is "weibull", with the alternatives "gompertz", "ev", "loglogistic" and "lognormal". A special case like the exponential can be obtained by choosing "weibull" in combination with shape = 1.
init
vector of initial values of the iteration. Default initial value is zero for all variables.
shape
If positive, the shape parameter is fixed at that value. If zero or negative, the shape parameter is estimated. Stratitfication is not meaningful if shape is fixed.
id
If there are more than one spell per individual, it is essential to keep spells together by the id argument. This allows for time-varying covariates.
param
Which parametrization should be used? The default uses the parametrization given in the vignette, while the survreg uses the same as in the survreg function. The canonical separates the parameters according to AFT or PH. Only(?) useful for the Gompertz distribution.
control
a list with components eps (convergence criterion), maxiter (maximum number of iterations), and trace (logical, debug output if TRUE). You can change any component without mention the other(s).
singular.ok
Not used.
model
Not used.
x
Return the design matrix in the model object?
y
Return the response in the model object?
center
Deprecated. No centering results are reported.

Details

The parameterization is different from the one used by survreg, when param =   "default". Then the model is

where S_0 is some standardized survivor function. The base-line parameters a and b are log shape and log scale, respectively. This is for the default parametrization. With the survreg parametrization, some signs are changed: b - z beta is changed to b + z beta, and exp(a) to exp(-a). For canonical, in addition, shape is divided by scale, which implies that the new scale indexes an AFT family for each fixed shape, while the new shape (like the old) indexes a PH family for each fixed scale, but only for the Gompertz distribution.

Values

A list of class c("aftreg", "coxreg") with components

coefficients
Fitted parameter estimates.
var
Covariance matrix of the estimates.
loglik
Vector of length two; first component is the value at the initial parameter values, the second componet is the maximized value.
score
The score test statistic (at the initial value).
linear.predictors
The estimated linear predictors.
means
Means of the columns of the design matrix.
w.means
Weighted (against exposure time) means of covariates; weighted relative frequencies of levels of factors.
n
Number of spells in indata (possibly after removal of cases with NA's).
events
Number of events in data.
terms
Used by extractor functions.
assign
Used by extractor functions.
y
The Surv vector.
isF
Logical vector indicating the covariates that are factors.
covars
The covariates.
ttr
Total Time at Risk.
levels
List of levels of factors.
formula
The calling formula.
call
The call.
method
The method.
convergence
Did the optimization converge?
fail
Did the optimization fail? (Is NULL if not).
pfixed
TRUE if shape was fixed in the estimation.
param
The parametrization.

See Also

coxreg, phreg, link[survival]{survreg}

Examples

data(mort)
aftreg(Surv(enter, exit, event) ~ ses, data = mort)

Author(s)

George BridgewaterTEXT

Documentation reproduced from package eha, version 2.2-5. License: GPL (>= 3)