Hello all:
I have a longitudinal dataset of adolescent relationships (N=683), each of which have one continuous measure of relationship length in months (MosTotalTog).
I have been successful in generating a three class solution as the best fit, using this code:
gsem (MosTotalTog <- _cons), lclass(C 3) nocapslatent nonrtolerance
I would like to generate a "predicted class membership" variable (predclass) to use in other analyses. My code is this:
predict cpost*, classposteriorpr
egen max = rowmax(cpost*)
generate predclass = 1 if cpost1==max
replace predclass = 2 if cpost2==max
replace predclass = 3 if cpost3==max
When I run a frequency distribution on this variable however, I only see two classes: 2 and 3, both of which account for the entire 683 observations. I am clearly "losing" class 1 somewhere, but I can't figure out where.
Many thanks!
Devon
I have a longitudinal dataset of adolescent relationships (N=683), each of which have one continuous measure of relationship length in months (MosTotalTog).
I have been successful in generating a three class solution as the best fit, using this code:
gsem (MosTotalTog <- _cons), lclass(C 3) nocapslatent nonrtolerance
I would like to generate a "predicted class membership" variable (predclass) to use in other analyses. My code is this:
predict cpost*, classposteriorpr
egen max = rowmax(cpost*)
generate predclass = 1 if cpost1==max
replace predclass = 2 if cpost2==max
replace predclass = 3 if cpost3==max
When I run a frequency distribution on this variable however, I only see two classes: 2 and 3, both of which account for the entire 683 observations. I am clearly "losing" class 1 somewhere, but I can't figure out where.
Many thanks!
Devon
Comment