I'm trying to create a Bayesian structural equation model where I can specify directional paths between observations, latent variables, and indicators.

I use the term observations to refer to data with potential associated errors. For example, suppose I'm trying to model the classic data from Holzinger and Swineford (1939) where children from two different schools completed the same set of tests. Here, observations would be test scores.

Latent variables are unobserved variables that potentially influence the observations and one another For example, one might be general intelligence.

Finally, indicators are observations that have no error. For example, one indicator might be the school.

So far, I have figured out how to create paths from latent variables to items, and from one latent variable to another. I assume that observations are multivariate normal,


where $\boldsymbol{\mu}$ is a $p$-length vector of means and $\boldsymbol{\Sigma}$ is an $n \times p$ covariance matrix. For former is given by

$$ \boldsymbol{\mu}=\boldsymbol{\nu}+\boldsymbol{\Lambda}\boldsymbol{\alpha} $$

where $\boldsymbol{\nu}$ is $p$-length vector of observation intercepts, $\boldsymbol{\Lambda}$ is a sparse $p \times m$ matrix of paths from latent variables to observations, and $\boldsymbol{\alpha}$ is a $m$-length vector of latent intercepts.

The covariance matrix $\boldsymbol{\Sigma}$ is given by

$$ \boldsymbol{\Sigma}=\boldsymbol{\Lambda}(\boldsymbol{I}-\boldsymbol{B})^{-1}\boldsymbol{\Psi}(\boldsymbol{I}-\boldsymbol{B}^\mathrm{T})^{-1}\boldsymbol{\Lambda}^\mathrm{T}+\boldsymbol{\Theta} $$

where $\boldsymbol{B}$ is a sparse matrix of paths from latent variables to latent variables, $\boldsymbol{\Psi}$ is an $m \times m$ diagonal matrix of latent variances, and $\boldsymbol{\Theta}$ is a $p \times p$ diagonal residual variance matrix.

I want to modify this model so that I can specify paths between indicators (let's say they are stored in matrix $\boldsymbol{X}$) and latent variables. Let's call this matrix $\boldsymbol{A}$.

I think I must modify $\boldsymbol{\Theta}$ to something like $\boldsymbol{A}$$\boldsymbol{\Theta}$$\boldsymbol{A}^\mathrm{T}$ but not sure where $\boldsymbol{X}$ should go.


You can't do this directly with the approach that you are using.

Instead, you can hack your way around it. For the indicator of interest, create it's own latent variable, for that element, the value of $\Lambda$ is 1.00, and the error variance is 0.00. Now the latent variable and the measured variable are interchangeable, and you can add the appropriate path to $B$.

  • 1
    $\begingroup$ I deleted my previous comment because I was being stupid. I understand now. $\endgroup$ – sammosummo Jan 27 '20 at 20:52
  • $\begingroup$ Oh, I didn't see it. :) $\endgroup$ – Jeremy Miles Jan 27 '20 at 21:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.