# ======================================================= # A.3 Drawing multistate diagrams with the Epi R package # Use boxes.Lexis function to create Figure A.4(a) # # December 11, 2018 # ======================================================= library(Epi) pdf("figureA4a.pdf", width=6, height=4) par(mai=c(0.01,0.01,0.01,0.01)) qmat <- rbind( c(NA,1,1), c(NA,NA,1), c(NA,NA,NA) ) rownames(qmat) <- colnames(qmat) <- c("State 0","State 1","State 2") boxes.Lexis(qmat, boxpos=TRUE, wmult=3, hmult=3, cex=1.2, txt.arr=c(expression(lambda['01']), expression(lambda['02']), expression(lambda['12'])) ) dev.off()