The duke of hazard

More changes to survHE. Earlier this week, I gave a talk at the Virtual Ispor US conference (our panel was W11). In preparation for the panel (and other things I was doing anyway), I got to talk to colleagues and thought a bit more of how survival modelling in HTA is kind of weird and “special”…

In particular, I realised how survHE doesn’t give by default any real information about the hazard and the cumulative hazard functions — this isn’t entirely true, because once the survival curve has been estimated (which is the whole point of survHE!) then \(h(t)\) and \(H(t)\) can be derived analytically in many cases, or at least numerically.

But I had not planned for a graphical representation of these two functions, which in fact is not really good practice, because they can be very helpful in understanding the model, particularly in the extrapolation portion (more on this here and in the NICE guidelines, among other places).

So, I’ve changed the code on the devel branch of the survHE GitHub repository so that the plot function now has an extra option what, which allows the user to choose whether the graph should depict \(S(t)\), \(h(t)\) or \(H(t)\).

library(survHE)
# Fits a simple model to the built-in dataset, using a Weibull distribution
m=fit.models(Surv(time,censored)~as.factor(arm),data,"wei")
# Plots the survival curve
plot(m)

# Plots the hazard curve
plot(m,what="hazard")

# Plots the cumulative hazard curve
plot(m,what="cumhazard")

The hazard curve is approximated by computing numerically the derivative of the cumulative hazard function.

comments powered by Disqus

Related