Hi
I fit a latent profile model to understand patterns of co-occurence of different types and severities of child abuse. I would like to be able to show the expected probability of each item being represented in the 3 classes in a bar graph as illustrated on Stata's page:
https://www.stata.com/new-in-stata/l...lass-analysis/
The webpage states that "We can use margins and marginsplot to visually compare the probabilities of participating in these activities across classes." I cannot see how to get the appropriate margins to then use marginsplot to display the relationship between the classes and the observed variables (as is shown on the webpage). That is, the steps I have followed are:
gsem( beaten hit smack csa1 csa2 csa3 parviol <-, logit) ( freq duration <- _cons) ,lclass(C3 ) nonrtolerance ///
margins ///
[results in the message "Warning: prediction constant over observations."]
marginsplot
[results in a line graph with one line, the variables (e.g. beaten, hit, smack) along the x axis and Mu along the y axis]
Is there a solution - or something I can read that can take me through the steps of illustrating this?
Many thanks.
I fit a latent profile model to understand patterns of co-occurence of different types and severities of child abuse. I would like to be able to show the expected probability of each item being represented in the 3 classes in a bar graph as illustrated on Stata's page:
https://www.stata.com/new-in-stata/l...lass-analysis/
The webpage states that "We can use margins and marginsplot to visually compare the probabilities of participating in these activities across classes." I cannot see how to get the appropriate margins to then use marginsplot to display the relationship between the classes and the observed variables (as is shown on the webpage). That is, the steps I have followed are:
gsem( beaten hit smack csa1 csa2 csa3 parviol <-, logit) ( freq duration <- _cons) ,lclass(C3 ) nonrtolerance ///
margins ///
[results in the message "Warning: prediction constant over observations."]
marginsplot
[results in a line graph with one line, the variables (e.g. beaten, hit, smack) along the x axis and Mu along the y axis]
Is there a solution - or something I can read that can take me through the steps of illustrating this?
Many thanks.
Comment