I have a latent class model that I'm broadly happy with. I want to be able to say that x% of the sample is in class 1, y % of the sample is in class 2, etc.
Previously I have gotten these summary statistics using:
Following posts elsewhere on these boards about calculating entropy in these models, I ran
Code:
predict pr*, classposteriorpr
sum pr1-pr4
and noticed these are a bit different from the results for the earlier code, for example, 24% vs 27% in one group.
Code:
estat lcprob, nose classposteriorpr
produces results quite close, but not identical to, those produced by the default estat lcprob specification, for example, 27.XYA% vs 27.XYB%.
My reading of the manuals doesn't get me much closer to understanding what predict and estat are doing differently. I'd appreciate 1. guidance on which command I should use to generate summary statistics, and 2. a pointer to anything I can read to make sure I understand this.
stata has two postestimation commands that are similar classpr and classposeriorpr. I think it is the former one that will give you the result that is consistent with lcprob. The latter one uses marginal predicted posterior probabilities and the former uses marginal predicted probabilities. I am not sure which one is "better" though.
ReplyDelete