1
$\begingroup$

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
....
$\endgroup$
  • 1
    $\begingroup$ 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) ..? $\endgroup$ – Tim Jul 13 '15 at 10:56
  • $\begingroup$ 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? $\endgroup$ – Halfeconomist Jul 13 '15 at 12:30
  • $\begingroup$ 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. $\endgroup$ – Tim Jul 13 '15 at 12:37
  • 2
    $\begingroup$ 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) $\endgroup$ – Halfeconomist Jul 13 '15 at 14:03
  • $\begingroup$ 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) $\endgroup$ – Halfeconomist Jul 13 '15 at 14:04
4
$\begingroup$

What you're describing isn't a "problem" per se. Since the three latent classes are unordered, their labeling is completely arbitrary. In any particular run of the poLCA function, it's normal for the labels on the latent classes (1, 2, or 3) to switch around, as they simply depend on what random starting points the poLCA function's estimation algorithm happened to select. As long as each fit achieves the same maximum log-likelihood, the fitted models are all the same, regardless of how the class labels turn out.

For models with covariates, the label-switching will result in different coefficients on the predictor variables (although the class-conditional response probabilities will be the same). This is because the latent class that's used as the baseline for calculating the covariate effects changes. Again, though, the fit of the model is mathematically and substantively the same.

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.

$\endgroup$
  • $\begingroup$ Welcome to CV and thanks for your answer @Drew! This was also my first thought however OP suggests in his comments that it is not the case. Unfortunately, we did not get any further information, so your answer is still probably the most likely explanation. $\endgroup$ – Tim Jul 15 '15 at 7:16
  • 1
    $\begingroup$ Thank you for your help! I checked and the predicted probabilities for the same classes (in a different order) change depending on different values of the loglikelihood. However, when I want to estimate the multinomial logit model to study the effect of covariates on class membership (in particular how the probabilities varies by income quartile), the same model (with a different order of classes) produces different predicted prior probabilities of latent class membership holding all the other variables at the mean for different income quartiles (income quartile 1, 2, 3 and 4). Thank you $\endgroup$ – Halfeconomist Jul 17 '15 at 10:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.