I am using flexsurvreg
from the flexsurv
package in order to fit a Gompertz model to survival data. An example of this with one categorical and one continuous covariate on each parameter is below:
library(survival)
library(flexsurv)
Call:
flexsurvreg(formula = Surv(time, status) ~ sex + shape(ph.ecog),
data = lung, dist = "gompertz")
Estimates:
data mean est L95% U95% se exp(est) L95% U95%
shape NA 0.000659 -0.000210 0.001527 0.000443 NA NA NA
rate NA 0.003355 0.002042 0.005512 0.000850 NA NA NA
sex 1.396476 -0.525441 -0.852719 -0.198163 0.166982 0.591294 0.426254 0.820236
shape(ph.ecog) 0.951542 0.000937 0.000375 0.001498 0.000287 1.000937 1.000375 1.001500
N = 227, Events: 164, Censored: 63
Total time at risk: 69522
Log-likelihood = -1139.932, df = 4
AIC = 2287.864
par$coefficients
shape rate sex shape(ph.ecog)
0.0006588492 -5.6973226550 -0.5254411364 0.0009368314
Note, the difference between the rate terms in the summary and the par$coefficients
call is that the latter is shown as the natural logarithm of the former
From the vignette - https://cran.r-project.org/web/packages/flexsurv/flexsurv.pdf - the Gompertz Hazard function is defined as -
Gompertz distribution with shape parameter a and rate parameter b has hazard function H(x: a, b) = b.e^{ax}
My question is, how are the covariates applied to the shape and rate parameters to derive the new hazard function?
Would the new shape parameter be shape_new = shape + ph.ecog_value(between 1-5)*shape(ph.ecog) = 0.0006588492 + (some value between 1 and 5)*0.0009368314
and the new rate be rate_new = rate + sex = -5.6973226550 - 0.5254411364
(as per the variables in my prior example)?
Note - this prior question is relevant, however, it did not concern the inclusion of covariates on the shape/rate parameters -Gompertz Aging analysis in R