Dear all,
I have the following code
The code above is used to predict which class we expect an individual to belong.
Let's say that instead I have the model estimates and want to compute posterior latent class probabilities for an external dataset. How can I compute this? Essentially how do I derive manually the probabilities obtained from the command "predict probabilities*, classposteriorpr" for the command above?
Many thanks
Andrew
I have the following code
Code:
clear webuse bc stset t, fail(dead) fmm, lcprob(smoking): (streg smoking, dist(exponential)) (streg smoking, dist(exponential)) fmm, coeflegend predict probabilities*, classposteriorpr gen predicted_class=1 if probabilities1>=0.50 replace predicted_class=2 if probabilities1<0.50 tab predicted_class
Let's say that instead I have the model estimates and want to compute posterior latent class probabilities for an external dataset. How can I compute this? Essentially how do I derive manually the probabilities obtained from the command "predict probabilities*, classposteriorpr" for the command above?
Many thanks
Andrew