# Reconciling AFT Model Output With AFT Theory (Survival Analysis)

TLDR: I have spent quite a lot of time trying to reconcile the output of AFT regression libraries with the expected outputs from the theory. Any input would be greatly appreciated.

Suppose you are using a Weibull AFT (Accelerated Failure Time) Regression Model i.e. given survival time $$T$$, suppose we have observed values of covariates $$x_{i1}, ..., x_{ip}$$ and possibly censored survival time $$t_i$$, then the Weibull AFT model is:
$$log(t_i) = \beta_0 + \beta_1 x_{i1} + ... + \beta_p x_{ip}+ \sigma \epsilon_i$$

For $$i = 1, 2, ..., n$$ samples. Where $$\epsilon_i$$ are IID according to a Gumbel (Extreme Value Type 1) distribution, $$\sigma$$ is a scale parameter etc.

Then it follows that the pdf for $$T$$ is given by:

Where the PDF of the Weibull distribution is given as:

I.e. if we let shape $$\gamma = \frac{1}{\sigma}$$ and scale $$\rho = exp(x\beta)$$ then we see $$T \sim W(exp(x\beta), \frac{1}{\sigma})$$.

My question is about the results from AFT libraries in R (e.g. aftreg or flexsurv) - the results are similar from both libraries. An example model fit output is given below - in this example you have two features in the model (TDC1 is time dependent covariate 1 coefficient and TDC2 is time dependent covariate 2 coefficient):

I.e. there are four parameters produced by the model: one for each of the input variables and a log(scale) and log(shape) parameter (baseline parameters apparently).

My questions are:

1. Why is there no estimate for $$\sigma$$ (only the baseline shape)?
2. Is it possible to reconstruct the pdf for $$T$$ (as above) using the four parameters estimated i.e. covariate coefficients and the baseline scale and shape?

See below for output from eha package (aftreg):

The shape parameter corresponds to the parameter you have identified as $$\sigma$$ (after skimming the flexsurv paper for 2 min)

• So you are suggesting that the baseline parameter log(shape) [returned in the results example above] is equal to the shape parameter from the Weibull PDF? Is this not the baseline shape? Jul 14 '21 at 18:42
• related to, read their paper and docs to figure out what the parameters correspond to in your parameterization. Jul 14 '21 at 19:14
• @MikeTauber the competing parameterizations of the Weibull are confusing. See for example this answer and this answer for examples of how that differs among packages and sometimes is somewhat inconsistent even within a package. Even though I wrote those answers, I find myself re-learning almost from scratch every time I come back to Weibull.
– EdM
Jul 14 '21 at 21:37
• Thanks @EdM this is most useful. Have you ever come across the library 'eha' and aftreg? Do you know what Weibull parameterisation is used in eha ? (see in post - trying to understand baseline parameters log(shape) and log(scale)) in relation to survreg also. Jul 15 '21 at 7:12
• (See below - I linked the two) Jul 15 '21 at 11:31

Attempting to answer this after researching.

There are multiple different parameterisations of Weibull that vary between packages and on Wikipedia (https://stats.stackexchange.com/a/468333/28500 https://stats.stackexchange.com/a/508252/28500)

With regards to log(scale) and log(shape) from the results output of the afreg library from the eha as given in the question. The documentation from the eha library states that the generic parameterisation for AFT survival regression is given by: $$S(t, a, b, \beta, z) = S_0\left( \left( \frac{t}{exp(b + z\beta)} \right)^{exp(a)} \right)$$

Where $$S_0$$ is a standardised survivor function. Where baseline parameters $$a$$ and $$b$$ are given by:

• $$a = log(shape)$$
• $$b = log(scale)$$

For Survival Modelling of Weibull AFT we have the following form of the standardised survival function, with shape and scale: $$S_0(t) = exp \left(-\left(\frac{t}{scale} \right)^{shape} \right) = exp \left(-\left(\frac{t}{exp(b)} \right)^{exp(a)} \right)$$

For different populations we have that (by definition of an AFT):

$$S(t) = S_0\left( \frac{t}{\lambda(x)} \right) = S_0\left( \frac{t}{exp(z \beta)} \right)$$

Therefore: $$S(t) = exp \left(-\left(\frac{t}{exp(b) exp(z\beta)} \right)^{exp(a)} \right) = exp \left(-\left(\frac{t}{exp(b + z\beta)} \right)^{exp(a)} \right)$$

So how does this help us reconcile with other parameterisations of Weibull (in particular that from Wikipedia)? For example, the following Weibull parameterisation $$T \sim W(\rho, \gamma)$$ with PDF:

$$f_T(t; \rho, \gamma) = F'(t; \rho, \gamma) = \frac{\gamma}{\rho} \left( \frac{\gamma}{\rho} \right)^{\gamma - 1}exp \left( -(\frac{t}{\rho})^{\gamma} \right)$$

Where $$\gamma$$ is the scale and $$\rho$$ is the shape. Therefore under this parameterisation:

$$S_T(t) = 1 - F_T(t) = exp \left( -(\frac{t}{\rho})^{\gamma} \right)$$

So in order to link the two parameterisations: $$\gamma = exp(a) = \frac{1}{\sigma}$$ and $$\rho = exp(b + z\beta)$$ i.e. $$T \sim W(exp(b + z\beta), \frac{1}{\sigma})$$ within the eha package. Therefore to answer my question above, it is possible to reconstruct the pdf for T with the four parameters provided by the eha package.