# NOT RUN {
A <- pop_pchaz(Tint = c(0, 90, 365),
lambdaMat1 = matrix(c(0.2, 0.1, 0.4, 0.1), 2, 2) / 365,
lambdaMat2 = matrix(c(0.5, 0.2, 0.6, 0.2), 2, 2) / 365,
lambdaProg = matrix(c(0.5, 0.5, 0.4, 0.4), 2, 2) / 365,
p = c(0.8, 0.2),
timezero = FALSE, discrete_approximation = TRUE)
B <- pop_pchaz(Tint = c(0, 90, 365),
lambdaMat1 = matrix(c(0.2, 0.1, 0.4, 0.1), 2, 2) / 365,
lambdaMat2 = matrix(c(0.5, 0.1, 0.6, 0.1), 2, 2) / 365,
lambdaProg = matrix(c(0.5, 0.5, 0.04, 0.04), 2, 2) / 365,
p = c(0.8, 0.2),
timezero = FALSE, discrete_approximation = TRUE)
plot_subgroups(A, B, title = "position='stack'")
plot_subgroups(A, B, position='fill', title = "position='fill'")
# }
Run the code above in your browser using DataLab