Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Latent class analysis / latent profile analysis

    I am trying to run a simple LCA and/or LPA in STATA 15. From the syntax of the manual it looks as if I should be able to run an LCA with a mix of continuous, binary, and categorical predictors. However, I keep running into error terms no matter what syntax I use! The most common error is:

    option lclass() is not allowed with models specified with continuous latent variables

    My understanding is that the lclass itself should help generate the latent constructs. Am I misunderstanding this operation?

    I have a bunch of analyses I am trying to run but for the basis of this post consider that I am trying to see if there are three groups (classes) of people based on their continuous scores of depression (dep), quality of life (QOL), and social support (SS). My syntax is:

    gsem (dep QOL SS <- _cons), lclass(C 3)

    I also tried:

    gsem (dep QOL SS <-, gaussian) (group <-, logit), lclass(C 3)

    Any advice from the list serve?

    Thank you so much!


  • #2
    I think the problem is with your variable names. In -sem- and -gsem-, by default any variable whose name begins with an upper case letter is treated as a latent variable. So Stata thinks QOL and SS are latent variables, which wouldn't be allowed. Either rename them to lower case, or specify the -nocapslatent- option and I think this will run without that problem.

    Comment


    • #3
      Hi Clyde, Thank you so much for your response! I actually tried that and it will run but now it just gives me a million log likelihood iterations with the (not concave) response. Any ideas what the problem could be given that? I'm working on a new data set and I was convinced this would be super straightforward to run so not sure what the issue is!

      Comment


      • #4
        Well, add the -iterate()- option, specifying a number of iterations that gets you a little past the point where the estimation starts "spinning its wheels" and run it that way. Stata will stop after the specified number of iterations and show you the estimates at that point. Those estimates are not valid, but you will be able to see where Stata is having trouble. Most likely you will find some parameter whose estimate is marching off to + or - infinity, or perhaps whose standard error is similarly unestimable. That will pinpoint the variable(s) whose associated parameters Stata is having trouble estimating. It is possible that the data simply can't identify those model parameters.

        You might need to eliminate one or more variable, or add a constraint to the model. If there is no evidently problematic variable(s), other potential interventions are specifying the -difficult- option or a different maximizing algorithm in the -technique()- option.

        Consider also the possibility that what is difficult to estimate is the three-way classification: does the model converge easily with just two classes? It may be that two classes in a three-way classification are too "close" to separate them.

        There really are a lot of possibilities; and resolving this is a matter of persistence and williingness to try a lot of different things.

        Comment


        • #5
          In addition to Clyde's always helpful advice and insights, you might find some help in the response I received from Jeff Pitblado at StataCorp in #3-#5 at
          https://www.statalist.org/forums/for...5-gsem-problem

          Red Owl

          Comment


          • #6
            Hi all,

            Thanks so much for the suggestions! I will try them this am and get let the listserve know how it goes! The SEs are really small on a few of the variables so that might be part of the problem. Thanks for pointing that out. I am usually pretty good at trouble shooting these issues but I'm working on a bit of a deadline and since it's a new feature there aren't as many resources posted as I usually find. Thanks again! So happy we have this resource to share expertise!

            Dana

            Comment


            • #7
              Hi again! Thanks so much for your help. It turns out the issue was the small standard errors making it impossible for the models to converge. I was able to eliminate the problematic variables and identified a LCA with three classes. Now step 2: how does membership in these classes predict change from T1 to T2? Is it recommended to conduct the longitudinal analyses using the SEM framework as well? If so, 1) do I run that all with the same line of syntax? and 2) what is the syntax for that? Or alternatively should I save the categories that define the profiles and use a MLM? Thank so much for everyone's help!

              Comment

              Working...
              X