I am running a LCA with the gsem-command. My code is as follows:
Code:
gsem ( var1 var2 <- _cons, family(bernoulli) link(logit)) , lclass(C 3) estat ic estat lcprob estat lcmean predict cpost*, classposteriorpr gen class1 = 1 if cpost1>0.5 replace class1=0 if cpost1<0.5 gen class2 = 1 if cpost2>0.5 replace class2=0 if cpost2<0.5 gen class3 = 1 if cpost3>0.5 replace class3=0 if cpost3<0.5
Not sure how to implement this...
Regards!
0 Response to Allocating cases to the class with the highest probabilty - Latent Class Analysis
Post a Comment