Upgrade the transMat object for the multi-state/relsurv setting.
Source:R/relsurv.transMat.R
modify_transMat.Rd
A function that upgrades the transMat object so that the population and excess-related transitions are included in the transition matrix.
Author
Damjan Manevski damjan.manevski@mf.uni-lj.si
Examples
# transition matrix for illness-death model
trans <- transMat(list(c(2,3),c(4), c(), c()),
names = c("Alive", "Relapse","Non-relapse mortality", "Death after relapse"))
split.transitions <- c(2,3)
modify_transMat(trans, split.transitions)
#> to
#> from Alive Relapse Non-relapse mortality.p
#> Alive NA 1 2
#> Relapse NA NA NA
#> Non-relapse mortality.p NA NA NA
#> Non-relapse mortality.e NA NA NA
#> Death after relapse.p NA NA NA
#> Death after relapse.e NA NA NA
#> to
#> from Non-relapse mortality.e Death after relapse.p
#> Alive 3 NA
#> Relapse NA 4
#> Non-relapse mortality.p NA NA
#> Non-relapse mortality.e NA NA
#> Death after relapse.p NA NA
#> Death after relapse.e NA NA
#> to
#> from Death after relapse.e
#> Alive NA
#> Relapse 5
#> Non-relapse mortality.p NA
#> Non-relapse mortality.e NA
#> Death after relapse.p NA
#> Death after relapse.e NA