Announcement

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

  • latent class models with repeated observations

    I am trying to estimate a latent class model using gsem lclass, with Stata 15.

    Each respondent has given two binary answers (choice1 and choice2). I model the responses as a logit model, and want to impose that coefficients are the same for both responses.
    I would also like to estimate this as a latent class model.

    I thought the following had cracked the problem:

    Code:
    gsem (pre11@c1 net11@c2 net21@c3 edu11@c4 edu21@c5  fle11@c6 fle21@c7 mon11@c8 tra11@c9  _cons@c10 -> choice1, logit  ) ///
              (pre12@c1 net12@c2 net22@c3 edu12@c4 edu22@c5  fle12@c6 fle22@c7 mon12@c8 tra12@c9  _cons@c10 -> choice2, logit  ) ///
          (C <- q220 ), lclass(C 2)
    but the @c1 etc not only constrains the coefficients to be the same within a class (which I want) but also across classes (which i dont).

    Is there any way to estimate latent class models with panel data using gsem?

    Thanks
    Michael

  • #2
    The type of constraints Michael wants to impose can be specified as follows:

    Code:
    webuse masc1, clear
    gsem ///
      (1: q1@c1 q2@c2 q3@c3 _cons@c4 -> q4, logit) ///
      (1: q5@c1 q6@c2 q7@c3 _cons@c4 -> q8, logit) ///
      (2: q1@d1 q2@d2 q3@d3 _cons@d4 -> q4, logit) ///
      (2: q5@d1 q6@d2 q7@d3 _cons@d4 -> q8, logit) ///
      (C <- q9 ), lclass(C 2)

    Comment


    • #3
      Thank you!

      Michael

      Comment

      Working...
      X