pharmaverse / ggsurvfit

http://www.danieldsjoberg.com/ggsurvfit/
Other
67 stars 19 forks source link

Updates for multi-state models #204

Open ddsjoberg opened 2 months ago

ddsjoberg commented 2 months ago

Thank you @therneau for the note!

  1. Multi-state data gets more complicated wrt number at risk. Consider the following simple model (for the colon cancer data set)
library(survival)
state <- c("enroll", "progression", "death")
smat <- matrix(0, 3, 3, dimnames=list(state, state))
smat[1:2, 3] <- smat[1,2] <- 1
statefig(1:2, smat)

The number at risk for the enroll:progression transition is the number at the foot of the arrow; the number at risk for the death state is the sum of the number in the enroll and progression box. The first is probably the right label for a cumulative hazard curve. Is the second the one we want for the Prob("death") curve? But then you can't have just one n.risk row for a plot with multiple groups.

  1. For multi-state curves, there are advocates for both "stacked" and non stacked forms.