Announcement

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

  • Margins of latent variable in SEM

    Hi all,

    I'm wondering if it's possible to estimate the predictive margins and average marginal effects etc of a latent variable in a structural equation model.

    To give you a simple simulated example, say I've got 2000 observations of a variable y that is affected by an unobserved variable U, which is measured through five variables x1-x5, and a few observed covariates z1-z3

    Code:
    set obs 2000
    drawnorm U z1 z2 z3
    
    forvalues x = 1/5 {
    gen x`x' = U + rnormal()
    }
    
    gen y = U + z1 + z2 + z3 + rnormal()
    Then I estimate my model like so:

    Code:
    sem ///
    (LatentU -> x1 x2 x3 x4 x5) ///
    (z1 z2 z3 LatentU -> y)
    I know I can estimate the predictive margins of my z variables, with Stata integrating over the latent variable, like so:
    Code:
    margins, at(z1=(-1 0 1))  predict(xb(y))
    But what I want to do is estimate the margins of the latent variable itself, i.e.
    Code:
    margins, at(LatentU=(-1 0 1))  predict(xb(y))
    But when I do that, Stata tells me "variable 'LatentU' not found in list of covariates"

    Is there any way of doing this? Or is there some reason doing this would be a bad idea? I can imagine the calculations of the standard errors are potentially quite complicated but can't see an obvious reason why it wouldn't be possible in theory, but I might be missing something.

    Thanks for any help!

    Chris

  • #2
    Dear Chris,

    I have a similar issue (I want to plot the marginal effects of a latent variable). Did you come up with a solution?

    Thanks for your attention.

    Best regards,

    FV

    Comment

    Working...
    X