Hi Statalist,
I have encountered a STATA issue when I was trying profile plot my dataset after I did the LCA (latent class analysis).
Basically, I was following a web post by StataCorp: see https://www.stata.com/new-in-stata/latent-class-analysis/
Everything works perfect except the step that "visually compare the probabilities of participating in these activities across classes." (please see the attached LCA picture from the website).
I have very similar dataset and also would such an visual output by the 3 latent classes.
The codes I used were:
For -margins-, there was an error saying that "Warning: prediction constant over observations."
For -marginsplot-, I could only get a graph for all classes (y-axis is "mu").
I wonder if anyone has some thought about this.
Thanks in advance
I have encountered a STATA issue when I was trying profile plot my dataset after I did the LCA (latent class analysis).
Basically, I was following a web post by StataCorp: see https://www.stata.com/new-in-stata/latent-class-analysis/
Everything works perfect except the step that "visually compare the probabilities of participating in these activities across classes." (please see the attached LCA picture from the website).
I have very similar dataset and also would such an visual output by the 3 latent classes.
The codes I used were:
Code:
margins marginsplot
For -marginsplot-, I could only get a graph for all classes (y-axis is "mu").
I wonder if anyone has some thought about this.
Thanks in advance

Comment