I have run a set of dyadic analyses (distinguishable dyads: mom, infant) using both an SEM panel approach, as well as via an MLM/HLM approach using Mplus. In short, while there are subtle differences between the two approaches (which I will not go into detail here) to analyzing the data, results from both approaches should yield the same estimates (assuming you are comparing the correct estimates from the appropriately parameterized models). Results from both approaches I have run, are in fact, comparable.

However, I am hung up on a certain issue that is bothering me. And that is this: most (in fact all) of the HLM approaches to APIM analyses I have seen in the literature have been run using SAS proc mixed in which a 'stacked' data set is utilized (long data format). In this case, the response variable for both partners of the dyad are stacked into one vector and dummy codes are utilized to identify the dyad member in analyses. Now, I am not a user of SAS but my understanding is that SAS proc mixed in this case is essentially an ANOVA type approach from the standpoint of a grouping variable (i.e., the dyad cluster) and an outcome variable (this is all btw, at the fixed effect level since that is level we are comparing to the SEM approach for this exercise).

However, in Mplus, we directly specify an MLM model using within and between syntax. In addition, I have my dataset set up in long format with two separate vectors for the outcome variable for both members of the dyad (rather than just one stacked vector and dummy codes). Since this is a person-period dataset, when my distinguishing dyad variable indicates one member of the dyad (i.e., parent) the outcome variable responses for the other member of the dyad is simply 'repeated' underneath their scores for when the distinguishing dyad variable indicates them. In this way, we end up with a dataset with the same number of records as would be the case in the stacked data structure noted above for SAS proc mixed, but without the need for using the dummy variable coding mechanism (or so I think since the estimates from both approaches I have run seem to be relatively close).

My queries are whether anyone has done such an APIM dyadic analyses in Mplus (HLM) and whether this data structure seems familiar to them (or off base) compared to the single stack in the SAS PROC MIXED setup. Secondly, for seasoned users of SAS, how does one constrain say the fixed effects at L1 for both members of a dyad to be the same. For pedagogic purposes, lets say we have a mom-infant dyadic dataset with 2 time points, so we have a mean for both mom and infant on an outcome, two autoregressive lags for both, and two cross-regressive lags for both (within level residuals as well, of course, as well as the covariance between mom and infant).

The doc at this link provides clarification/background to my queries as they illustrate comparing SAS PROC mixed with Mplus SEM (but not analogous HLM) dyadic analyses.

Any insight and thoughts would be much appreciated.

  • $\begingroup$ I don't know enough about this analysis to answer, but have you come across the paper "Have multilevel models been structural equation models all along" by Curran? The paper shows how long and wide formats can give the same results. $\endgroup$ Commented Jan 18, 2017 at 5:01
  • $\begingroup$ @JeremyMiles thanks for the rec on this paper I will check it out. $\endgroup$
    – Jhaltiga68
    Commented Jan 18, 2017 at 5:20

1 Answer 1


In short, the answer to this question is that the parallel modeling in Mplus does not use the stacked person-period-pairwise data format that is done for SAS and SPSS mixed-effects modeling. Rather, it is a dyadic-period dastaset with (as described) separate response vectors for the two partners in the dyad. Note that the increase in statistical power gained by using the stacked data format (essentially 2x the cases) is something that should be accounted for if using the stacked (single vector) approach (this can be done in SAS using the Kenward-Rogers option cf. Satterthwaite vs Kenward-Roger approximations for the df in mixed effects models; for an illustration of this method in practice, see this paper which uses the stacked approach).

I should add that my results between the two approaches are essentially identical (as they should be), with the proper constraints placed on the APIM-SEM model so as to render it analogous to the MLM parameterization at L1 (fixed effects only, no random effects).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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