# Latent class analysis order classes

I am performing a latent class analysis with covariates. I want to calculate the predicted probabilities for the membership to different classes. However, if the order of the classes changes (as I rerun the model) I obtain different results for the predicted probability of the same class but in a different order. Does anyone encountered this problem before? I increased the number of maximum iterations in the model, but it does not seem to help. Also the classes' composition changes slightly when I rerun the model.

f  <- cbind(a1, a2, a3, a4) ~ sex + age + age_sq + inc
lc <- poLCA(f, mydata, nclass=3, graphs=TRUE, maxiter=50000)


where a1, a2, a3, a4 and inc varies between 1 and 4. This is the class composition, for example:

$a1 Pr(1) Pr(2) Pr(3) Pr(4) class 1: class 2: class 3:$a2
....

• Since algorithms for estimating LCA are randomized: are you sure that the only thing that changes is not just the class labels (e.g. class 1 becomes class 2 and class 2 becomes class 1) ..? – Tim Jul 13 '15 at 10:56
• Yes, I am sure.. There are different results for the predicted probability of the same class when it is in a different order. The estimation of the predicted probability should be the same, no matter which is class estimated first, right? – Halfeconomist Jul 13 '15 at 12:30
• There are LCA models for ordered classes - are you using one of those? Also, for me it is not really clear what is your problem, so it would be good if you could provide more detailed description followed with an example of your problem. – Tim Jul 13 '15 at 12:37
• It is not a model for ordered classes. First, I estimate model a) as below. Then, I reestimate model a), but as you said algorithms for estimating LCA are randomized so class 1 in the first estimation would not necessarily correspond to class 1 in the second estimation but for example in the second estimation the same vector of probabilities would be called class 3. However, no matters how we call them, class 1 in the first estimation is identical to class 3 in the second estimation. Hence, I would expect that the predicted probabilities are the same for class 1 (1st est) and class 3(2nd est) – Halfeconomist Jul 13 '15 at 14:03
• Model a) : f <- cbind(a1 a2 a3 a4) ~ male + age+ age_sq + educ+ inc + married + wealth lc <- poLCA(f, mydata, nclass = 3, graphs = TRUE, maxiter = 50000) – Halfeconomist Jul 13 '15 at 14:04

For more information on ordering latent classes, see section 5.6 of the poLCA user’s manual at http://dlinzer.github.io/poLCA/. This section also describes the use of the poLCA.reorder() function for manually reordering the latent classes in your model. If you are primarily interested in each observation's posterior class membership probabilities, see section 5.3 of the user's manual and the posterior element of the estimated poLCA model object.