Announcement

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

  • Response probability for Latent class analysis

    Hello! I am new to LCA and would be appreciative of some help.

    Right now, I have found my model and I would like to generate the response probability for each of the variable in each of the classes. I am unsure of the code, and hope someone could help me out. Thanks in advance

    These are my codes right now:

    gsem ( Lifetime_smoker Daily_Smoker Lifetime_Electricsmoker Daily_ElectricSmoker Lifetime_drinker Daily_Drinker softdruglife softdrug30 Harddruglife harddrug_30days partydruglife partydrug_30days pharmadruglife pharmadrug_30days <-), logit lclass(C 6)

    estat lcprob
    estat lcmean
    estat lcgof

    lcaentropy


    I tried this code: margins, predict(outcome(Lifetime_smoker) class(6)) predict(outcome(Daily_Smoker) class(6)) predict(outcome(Lifetime_Electricsmoker) class(6)) predict(outcome(Daily_ElectricSmoker) class(6)) predict(outcome(Lifetime_drinker) class(6)) predict(outcome(Daily_Drinker) class(6)) predict(outcome(softdruglife) class(6)) predict(outcome(softdrug30) class(6)) predict(outcome(Harddruglife) class(6)) predict(outcome(harddrug_30days) class(6)) predict(outcome(partydruglife) class(6)) predict(outcome(partydrug_30days) class(6)) predict(outcome(pharmadruglife) class(6)) predict(outcome(pharmadrug_30days) class(6))

    but it gave me a similar output to the estat lcmean code.

    My response values are binary.
Working...
X