# a. The multistate life table based on Nelson-Aalen estimators
# The example obtains Nelson-Aalen estimators of the cumulative transition rates using the mavna package. It derives the multistate life survival function from the transition rates and the expected sojourn times from the survival function. The radix is the number of persons by state at the reference age (e.g. at the start of the life history).
data(GLHS)
z <- Parameters (GLHS)
cr <- Cumrates (irate=3,data=GLHS,plot.cumrates=NULL)
S <- MSLT.S(cr$NeAa[,,,1])
radix <- c(10000,0)
mslt <- MSLT.e (S,radix)
# b. The multistate life table based on occurrence-exposure rates
cr <- Cumrates (irate=3,data=GLHS,plot.cumrates=NULL)
S <- MSLT.S(cr$oeCum)
radix <- c(10000,0)
mslt <- MSLT.e (S,radix)
# c. Plot the multistate survival function
MSLT.S.plot(S,mslt$e0,title="Multistate survival function")
Run the code above in your browser using DataLab