Hi all,
I am searching for a method to illustrate a multistate model. I have tested statefig, but with longer labels it does not work well (check code below and compare the different labels). I know that lavaan includes something like it, but I am not sure if lavaan is a good choice for multistate models.
Thanks in advance
states <- c("1",
"2",
"4",
"3",
"5")
states <- c("Condition 1",
"Condition 2",
"Condition 4",
"Condition 3",
"Condition 5")
cmat <- matrix(0L,5,5, dimnames = list(states,states))
cmat[1, -1] <- c(1.2,1,0.8,0.4)
cmat[2, -2] <- c(0,1,0,1)
cmat[3, -3] <- c(0,0,0,1)
cmat[4, -4] <- c(0,0,1,1)
statefig(c(1,3,1), cmat,
box = T,
offset = c(-10,0,0,0,1))