I have the following code for a dataset I am running.
VARIABLE: NAMES ARE ID GP Y1-Y18 U1-U3 MFS OVS AMS WVS LCS OV RLN SM WV LC RDN; USEVARIABLES ARE Y1-Y18 U1-U3 OV SM RDN; CLASSES = cg (4) c(2); KNOWNCLASS = cg (GP = 1 GP = 2 GP = 4 GP = 5); CATEGORICAL = U1-U3; CENTERING = GRANDMEAN (OV SM RDN); MISSING IS BLANK; AUXILIARY = ID; ANALYSIS: TYPE=MIXTURE MISSING; ESTIMATOR=MLR; STARTS = 20 2; MODEL: %OVERALL% i s q| Y1@0Y2@1Y3@2Y4@3Y5@4Y6@5Y7@6Y8@7Y9@8 Y10@9Y11@10Y12@11Y13@12Y14@13Y15@14Y16@15 Y17@16Y18@17; i s q ON OV SM RDN; f BY U1-U3@1; c#1 ON cg#1 OV SM RDN; c#1 ON cg#2 OV SM RDN; c#1 ON cg#3 OV SM RDN;
My question is whether there is a way to specify just 1 latent class in cg#3? Thanks, Don
Yes I understand that, however wouldn't that set the number of classes to 1 in all known groups? What I was hoping to achieve was cg#1(2), cg#2(2), cg#3(1), and cg#4(2). Can this be done within the classes command? Thanks, Don
Note that this gives the probability conditional on these intercept and slope values.
C. Lechner posted on Wednesday, October 10, 2018 - 4:22 am
Dear Linda and Bengt,
I am trying to estimate a multiple-group LCA model in which the number of classes differs across groups (i.e., known classes, cg).
I have twelve groups and up to five latent classes: classes = c(5) cg(12). The model is supposed to be a five-class model for one group, a four-class model for most other groups, and a three-class model for two groups.
I define the group with the highest number of latent classes (5) as the reference group by listing it last in the KNOWNCLASS option.
When I constrain only one class proportion, this works fine: