You are here

Help in translating a longitudinal path model to OpenMx SEM syntax

2 posts / 0 new
Last post
blazej's picture
Joined: 11/20/2018 - 05:02
Help in translating a longitudinal path model to OpenMx SEM syntax
Image icon 2018-12-25_14-08.png158.26 KB

Greeting everyone!

As I'm new to SEM (in general) and OpenMx I would like to ask you for some help in specifying the model in question properly.

I'm trying to reproduce results for a 3 time points path model where specific indirect effects where of interest. The original model was depicted as in attached image.

There are 4 constructs (CN, IS, SE, OD) measured in 3 time points. In the original model, SE and OD are standardized simple aggregates of scale items, BUT CN and IS where first adjusted to clear shared variance, that is, each timepoint CN and each corresponding timepoint IS is represented by standardized residuals from regressions:

CN_T1 = resid(lm(meanCN_T1 ~ meanIS_T1))
IS_T1 = resid(lm(meanIS_T1 ~ meanCN_T1))

What I'd like to do, is to code a model, where CN, IS, SE, OD at each time point are latent variables measured by raw score items, while mirroring what was originally done to CN and IS (i.e. residualized scores).

Also I'm not sure what do the authors of the original model mean when saying that:

The four T2 disturbances are allowed to correlate with one another and the four T3 disturbances were allowed to correlate with one another; correlations not shown.

And how to code this properly in OpenMx syntax.

Eventually I'd like to test the indirect effect of SE_T1 on OD_T3 via both CN_T2 and IS_T2.

I know that's a lot to ask, but could anyone help me out the code?
I'm happy to answer any questions if I didn't make myself clear at some point.

Thank you!

AdminNeale's picture
Joined: 03/01/2013 - 14:09
Why residualized scores?


I think the model you describe should be fairly easy to set up. If you have a decent path diagram of your model (every variable and every variance/covariance/causal path explicitly specified) you could use Onyx (http:// to generate OpenMx code. As usual, the decision is whether this is the only likely configuration of number of variables and occasions of measurement that will be encountered. If those data features is likely to vary in other applications, then it may be worth the additional investment to specify in terms of matrices, whose dimensions can be changed automatically by the script once given the number of variables, occasions of measurement etc.

However, I am unsure about the rationale to use mutually-residualized variables. In SEM this might be done by specifying a common factor with residual, variable-specific factors. Only the residual factors would be allowed to have causal influence to the next time point. The issue is then that 2 variables (3 statistics, 2 variances and a covariance) are not sufficient to identify both the 2 factor loadings and 2 residual factor loading. One option, for positively correlated variables, would be to equate the two common factor loadings.

However, I am struggling a bit with the why issue about interest in specific-to-each-variable parts only. Is there some reason the shared variance could not be transmitted over time?