Announcement

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

  • Post estimation models for latent class analyses

    I recently ran a latent class analysis for my choice experiment data using the "lclogit" command. I am trying to get the latent class model but keep getting the error "varlist not allowed."

    I ran the lclogit with my dependent variable "Select" the dummy coded optout, and my attributes. I included 2 demographic variables in the membership. This coding worked.

    My exact coding was: lclogit Select optout quail_rec tort_rec water_med water_high scenic_med scenic_high Tax, group(groupid) id(Respondent) nclasses(3) membership(gender_f age)

    For the latent class model, I used the coding: "lclogitml iterate (50)", but I got the error "varlist not allowed"

    I am trying to get the latent class model with standard errors and coefficients. Can anyone help? Thanks.

  • #2
    I'm not familiar with the user-written -lclogitml- command, but on the assumption that it follows standard Stata syntax, the problem is that you failed to put a comma between lclogitml and iterate(50). Without that, Stata thinks that -iterate- is a variable name, and there aren't supposed to be any variables named there.

    Comment


    • #3
      That was it! I also needed to download the gllamm package because I didn't have that on my computer. Thanks!

      Comment


      • #4
        Nicole Nimlos: You may be interested in the -lclogit2- package (click here for the background paper). It's an improved version of -lclogit-, and doesn't require -gllamm- for the ML estimation step.

        Comment


        • #5
          I used -lclogitml2- with 3 classes to get the model with standard errors and coefficients, but it has 3 classes with my attributes, 2 shares with my covariates, and my payment is under Fix. How do I interpret this?
          Last edited by Nicole Nimlos; 29 Sep 2022, 11:33.

          Comment


          • #6
            Your question has been answered in the background paper.

            Comment

            Working...
            X