Announcement

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

  • -GSEM- Adding higher-level predictors to a multilevel random intercept model

    Hello!

    I have a question on generalized structural equation modeling. Say, I fit the following two-level random intercept model:
    Code:
    gsem (x1 -> y, ) (x2 -> y, ) (M1[hospital_id] -> y, ), covstruct(_lexogenous, diagonal) vce(robust) latent(M1 ) nocapslatent
    where x1/x2 and y are at the doctor level and hospital_id is a latent variable denoting random intercept for upper (hospital) level.

    Now, in my data set I also have several hospital level predictors (say, b1 and b2). Is it plausible to add them to the model and estimate like:
    Code:
    gsem (x1 -> y, ) (x2 -> y, ) (M1[hopsital_id] -> y, ) (b1 -> y, ) (b2 -> y, ), covstruct(_lexogenous, diagonal) vce(robust) latent(M1 ) nocapslatent
    I recall that in multilevel estimation dependent variable (y) must be at the lowest level (doctor in my case), so I am not sure if I can estimate effects of higher-level b1 and b2 on y.

    Thank you in advance for help.


  • #2
    Let me provide a bit more information on the issue. My goal is to fit a -gsem- model similar to the following -xtmixed- one:
    Code:
    xtmixed y x1 x2 b1 b2 || hospital_id: x1 x2 b1 b2, vce(robust)

    Comment


    • #3
      Example 38g Random-intercept and random-slope models (multilevel) of the SEM / GSEM volume of the user's manual has some guidance on how to fit random-slopes multilevel models using gsem.

      Comment


      • #4
        Joseph, I am thankful to you for providing such a useful example.

        Comment

        Working...
        X