Message/Author 


Hi, I am new to DSEM and Mplus. I am fitting a model for 3 variables that were collected for 88 participants (8224 observations per participants). y1 is binary. I am interested specifically in the following mediation model: y1 at t1 > y2 at t > y3 at t (I realize that the b path does not control for time sequence) My questions are as follows: 1. To obtain the b path, does it make sense to fit a contemporaneous path (y2>y3) instead of estimating a covariance among the residuals of y2 and y3? 2. The mediation model I am interested in is 111 (all estimates are within person) but I could not find a way to estimate a*b path on the within effects, unless I set them to be fixed (see code below). Is there a way to estimate the model at the within level? Thanks, Yogev Here is the code that I was able to fit: %WITHIN% y1Byy11  y1 ON y1&1; y1 ON y2&1 (y1Byy21); y1Byy31  y1 ON y3&1; y2Byy11  y2 ON y1&1; y2Byy21  y2 ON y2&1; y2Byy31  y2 ON y3&1; y3Byy11  y3 ON y1&1; y3Byy21  y3 ON y2&1; y3Byy31  y3 ON y3&1; y3 ON y2 (y3Byy20); logv1  y2; logv2  y3; %BETWEEN% y2 y3 y1 y1Byy11logv2 WITH y2 y3 y1 y1Byy11logv2; model constraint: new (y3Byy20Byy11); y3Byy20Byy11=y1Byy21*y3Byy20; 


1. Yes. 2. Your case is quite complex from a mediation modeling point of view. Not only do you want to have random slopes in a twolevel setting but you also have longitudinal data. Both features call for special considerations. For the former you can check the Preacher pdf at http://www.statmodel.com/download/Preacher.pdf. For the latter you could read the Cole & Maxwell 2003 article in Journal of Abnormal Psychology; the 2016 SEM article by Deboeck and Preacher (No need to be discrete) is also relevant. 


Thanks! I will look into it. In the meantime, I had a few additional Qs: 1. Given that y1 is binary – are all estimates in the output relevant for y1 fixed at a specific reference category or are they estimates across categories (in other words is y1 dummy coded or effectcoded by Mplus)? 2. Looking at the autocorrelations plot, looks like some of the autocorrelations remain high even after thining (thin = 10). However, thining did not change any of the estimates substantially. Is this something I should be worried about, and if so – how would you suggest to proceed? 3. In some of the models, I received the following error message. Does that indicate a problem with the model? PROBLEMS OCCURRED IN SEVERAL ITERATIONS IN THE COMPUTATION OF THE STANDARDIZED ESTIMATES FOR SEVERAL CLUSTERS. THIS IS MOST LIKELY DUE TO AR COEFFICIENTS GREATER THAN 1 OR PARAMETERS GIVING NONSTATIONARY MODELS. SUCH POSTERIOR DRAWS ARE REMOVED. 


1. The output refers to the highest level of the binary y1. 2. SEs could be a bit off but may not be bad. CIs could be more off. 3. Not necessarily but you might ask why the estimated ARs would be so high  is there perhaps a trend over time that is not modeled? 


Sorry for the delay in responding. Thank you for your response. I have two follow up questions: 1. you said that the output refers to the highest level of the binary y1. Is there a way to “effect code” the binary y1 such that all the output would express estimates across the categories of y1? 2. having read Cole & Maxwell 2003, I would like to test the 111 mediation with a path going from (y1 at t2) to (y2 at t1) to (y3 at t). I think I know how to specify the path from (y2 at t1) to (y3 at t). However, I am not sure how to specify the path from (y1 at t2) to (y2 at t1) in a DSEM framework. I tried the following but it did not work: y21Byy12 y2&1 ON y1&2; Alternatively, can I simply use the path from (y1 at t1) to (y2 at t) because of the assumption of stationarity? Thanks! 


1. No. 2. If you have y2_t1 on y1_t2, I think you would also have y2_t on y1_t1 which means you would say: y2 on y1&1; y3 on y2&1; 

Yogev Kivity posted on Wednesday, October 10, 2018  8:35 am



1. thank you! 2. Let me make sure I fully understand. Do you mean that I should use the path from (y1 at t1) to (y2 at t) instead of directly estimating the path from (y1 at t2) to (y2 at t1)? (again, due to the assumption of stationarity). I also have two additional questions: 3. Once I've specified the indirect path using a model constraint under NEW, is there a way to use the indirect path as a dependent variable (e.g., to see if the indirect path is moderated by a level 2 covariate)? 4. Related to 3, is there a way to use the indirect path as an independent variable (e.g., to see if the indirect path predicts other parts of the model)? 


2. Yes, because it says that they have a lag 1 relationship which in time series modeling includes y2_t1 on y1_t2. 34. The indirect path is not a variable so you cannot do this. If both a and b are random in a twolevel setting it would make sense but is not available in the current version. You can instead moderate each of the a and b paths. 


Thank you! 34. Yes. both a and b are random. In that case, is there a way to save the clusterspecific estimates of the indirect path (or a and b separately and I will multiply them) so I could use them as DV/IV in a separate model? I guess it is not optimal because doing so would assume the indirect path is measured without error (is that correct?), but it is better than nothing. I tried using: SAVEDATA: STDRESULTS ARE STDRESULTS.dat; but that option saves the standardized results and I am interested in the unstandardized one. Also, I noticed that when I average those estimates, I get the 'WithinLevel Standardized Estimates Averaged Over Clusters' rather than the means for each path. Does that matter? 


You can use Save = FSCORES; The factor scores are the estimated random a's and b's on the cluster level. When a and b are random, that is, vary on the cluster level, their product can be used as an IV using the latent variable interaction option XWITH: ind  a XWITH b; where ind can be used as an IV. 

Andrea H. posted on Thursday, September 19, 2019  12:56 pm



Hi Dr. Muthen, I have a question concerning the warning message "WARNING: PROBLEMS OCCURRED IN SEVERAL ITERATIONS IN THE COMPUTATION OF THE STANDARDIZED ESTIMATES FOR SEVERAL CLUSTERS. THIS IS MOST LIKELY DUE TO AR COEFFICIENTS GREATER THAN 1 OR PARAMETERS GIVING NONSTATIONARY MODELS. SUCH POSTERIOR DRAWS ARE REMOVED. THE FOLLOWING CLUSTERS HAD SUCH PROBLEMS": I was expecting AR parameters > 1, they are actually a part of the mechanisms I am interested in in my current work. Is there a possibility to keep or investigate these posterior draws in Mplus, instead of having them removed? Thanks a lot, Andrea 


This message concerns only standardized coefficients. In the original metric, i.e., for the model results section they are not removed. If AR>1 then Var=infinity so the standardized coefficients can't be computed for that draw. In most cases AR>1 only in a few MCMC iterations so we tend to ignore that. If you have more systematic AR>1 that would indicate some kind of positive trend and you might obtain a more meaningful model if you add a regression on time (and thus reduce the AR coefficient and obtain a more accurate model). 

Andrea H. posted on Friday, September 20, 2019  12:22 am



Hi Tihomir, thank you very much for your quick answer and clarification! In the DSEM context, would I add the regression on time with the time variable I also use in the TINTERVAL statement? Kind Regards, Andrea 


You will need to create a separate copy of the time variable that would be used in the model. It should look something like this variable: names = Y ..... time1 ....; usev = Y .... time2; within = ..... time2; tinterval = time1(0.1); define: time2=time1; Model: %Within% Y on time2; Y^ on Y^1; %Between% Y; savedata: file is 1.dat; Look at the save data file and make sure both time variables come through as 1,2,3, ... If you have a long time series you can approximtely standardize the time2 variable so that the coefficient comes in somewhat standardized. Say that you have 100 time points on average you can replace define: time2=time1; with define: time2=time1/100; 

Back to top 