Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to manually derive posterior latent class probabilities with finite mixture model

    Dear all,

    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
    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










Working...
X