Hi guys,
I've recently been using a package known as 'randomLCA' for random effects latent class analysis.
Within the randomLCA summary stats, you get a table of 'conditional probabilities' (for all classes)
However, because classes are unordered, the summary stats and in-built plots don't correspond to how I'd like to visually represent them.
Therefore, I wondered if there was a way to take my ordered table and plot it in a similar style to the multiple line plot produced by the randomLCA package?
The table is given
Conditional outcome probabilities
MR SC Anx Pain Act Mob
Class 1 0.8884 0.8367 0.5446 0.2954 0.1522 0.0175
Class 2 0.9843 0.9785 0.7621 0.8115 0.8026 1.0000
Class 3 0.0304 0.0164 0.3054 0.2371 0.0027 0.0212
I would like a plot of the table to be presented similar to this:
Which was generated using the following code from randomLCA
plot(trial.lca3, graphtype = "conditional", type = "a", pch = 1:2, cex = 0.6,
xlab = "Health Domain", ylab = "Conditional Outcome Probability",
scales = list(x = list(at = 1:6, labels = names(trial)[1:6])),
key = list(space = "right", adj = 1, border = TRUE, cex = 0.7,
text = list(c("Class 1", "Class 2", "Class 3")),
col = trellis.par.get()$superpose.symbol$col[1:3]))
PS, for clarity, my initial data frame is called 'trial', and my randomLCA output is called 'trial.lca3'
Would appreciate anyone's help on the matter