Skip to contents

The three-parameter family that NESTS the Weibull (q = 1), the log-normal (q = 0) and the exponential, so choosing among them is a likelihood-ratio test rather than a judgement call.

Usage

morie_generalized_gamma_aft(time, event, X, max_iter = 500L, tol = 1e-06)

Arguments

time

follow-up times, strictly positive.

event

1 for an event, 0 for censored.

X

covariate matrix.

max_iter, tol

optimiser controls.

Value

list with beta, sigma, q, loglik, lr_vs_weibull, p_vs_weibull, lr_vs_lognormal, p_vs_lognormal, preferred.

Details

The catch is that q is weakly identified: it is estimated almost entirely from tail behaviour, and with few events the test has very little power. A family selected this way on a small dataset is a coin-flip dressed as a test, which is why both LR statistics and both p-values are returned rather than just the winner.

References

Prentice, R. L. (1974). A log gamma model and its maximum likelihood estimation. Biometrika, 61(3), 539-544.

Examples

set.seed(5)
X <- matrix(rnorm(200), ncol = 2)
tt <- exp(1 + X %*% c(0.5, -0.3) + 0.6 * rnorm(100))
morie_generalized_gamma_aft(tt, rep(1, 100), X)$preferred
#> [1] "lognormal"