Message/Author 


Hello. I've looked through the User's Manual and this website but seem to be struggling on the appropriate syntax for the following model. I want to test partner effects (i.e., husbands' predictor 1 and predictor 2 scores on wives' outcome variable) and viceversa. However, I will also need a mutual influence model, as I am interested in the effects between husbands' and wives' outcome scores. I ran a version of this (incorrectly) in multilevel modeling using HLM, and the link between husbands' and wives' outcome really seems to be the key significant variable. Could anyone point perhaps to an example that would enable me to include both the partner effects for two predictors and the mutual influence between husbands' and wives' Y's? Thank you. 


Perhaps you find what you are interested in here: James L. Peugh, David DiLillo & Jillian Panuzio (2013) Analyzing MixedDyadic Data Using Structural Equation Models. Structural Equation Modeling. Pages: 314337 DOI: 10.1080/10705511.2013.769395 


As a followup, I think I have my syntax mostly down, but I continue to get an error message that "horisk cannot be on the lefthand side of a BY command". Do you have any thoughts on how I may successfully run a partner effects and mutual influence model simultaneously? My predictors are husband familyoforigin and wife familyoforigin distress alongside husband and wife depression history, to predict partner's scores on the risk variable as an outcome. However, I am also interested in whether one's own risk predicts risk in a partner (i.e., the relationship between husbands' and wives' risk scores ... or the mutual influence part). TITLE: basic test DATA: FILE = C:\Users\joetrombello\desktop\brief file for dom.sav; VARIABLE: NAMES = cID hfoi wfoi horisk worisk hdep wdep; ANALYSIS: TYPE = GENERAL; MODEL: horisk ON wfoi wdep; worisk ON hfoi hdep; horisk BY worisk; OUTPUT: SAMPSTAT STANDARDIZED STDYX *** ERROR in MODEL command horisk cannot be on the lefthand side of a BY statement. 


You have "horisk" as an observed variable in the NAMES list and then you are trying to define it as a latent variable using BY. 


So I will need an ON or WITH instead? 


You cannot use the name of an observed variable on the lefthand side of a BY statement. A BY statement defines a factor. The name on the lefthand side of the BY statement should be the name of the factor defined by the BY statement. You should use ON for regression or WITH for covariance. 


Is there a way to attach an output file on here? I think I finally have all the syntax down correctly for a mutual influence and partner effects model, but my estimates and standard errors for the wives' portions seem wildly off. 


Please send the output and your license number to support@statmodel.com. 


Hello: Instead of the WIDE SEMbased approach to dyadic analyses outlined by Peugh, I am conducting a dyadic APIM analyses in the MLM setup. Looking to predict Y at T2....k from actor (autogressive) and partner (crossinfluence) at time k1. Because I have the personperiodpairwise data set up (LONG), I am struggling with how to create the relevant time variables even using dummy codes for infant and parent (the individuals) because the two data vectors for actor and partner are stacked variables (thus, yield the same overall information). Is there an example of the APIM model within the MLM framework anyone could point me to? 


I am not familar with these various formats  you may want to ask on SEMNET. Not sure if our longtowide and widetolong reformatting options are helpful. 

Sarah Arpin posted on Tuesday, February 21, 2017  1:40 pm



Hello, I am trying to test a mutual influence model for indistinguishable dyads, with indirect effects included (variation of APIMeM). I am having a difficult time finding syntax for this type of model. Do you have resources you would suggest, or suggested syntax? Thank you! 


Try SEMNET. If you get a good answer using Mplus, please report here on it. 


You may also want to check CrossValidated where I posted on a variant of what you are asking in re: APIM and Mplus syntax. It may be helpful. 

Sarah Arpin posted on Wednesday, February 22, 2017  12:08 pm



Thank you! I will take a look at these other resources and definitely post an answer if I find one. 

Sarah Arpin posted on Thursday, August 31, 2017  3:01 pm



Hello, I am trying to run an APIMeM model for indistinguishable dyads. I need to control for a third variable (C). Is the following syntax correct? That is, am I correctly specifying a model which tests for indirect effects of X on Y via M, for actors and partners, controlling for C for each dyad member? I expect the partner effects for path a to be zero, as I have specified in the syntax below. TITLE: APIMeM indistinguishable members DATA: FILE is DataComplSelVar.csv; VARIABLE: NAMES ARE X1 M1 Y1 X2 M2 Y2 C1 C2; USEVAR = X1 M1 Y1 X2 M2 Y2 C1 C2; analysis: estimator = ml; bootstrap = 5000; model: M2 on X2 C2 (aa); M2 on X1@0(ap); M1 on X2@0 (ap); M1 on X1 C1 (aa); Y2 on M2 (ba); Y2 on M1 (bp); Y2 on X2 C2 (ca); Y2 on X1 C1 (cp); Y1 on M2 (bp); Y1 on M1 (ba); Y1 on X2 (cp); Y1 on X1 (ca); Y1 with Y2; X2 with X1; M2 with M1; Model indirect: Y2 ind X2; Y2 ind X1; Y1 ind X2; Y1 ind X1; output: stand; res; cinterval(bcbootstrap); Thank you! 

Sarah Arpin posted on Thursday, August 31, 2017  3:54 pm



I posted the message above, and found a slight error in the syntax I pasted. Please reference this syntax instead when answering my question  my apologies! TITLE: APIMeM indistinguishable members DATA: FILE is DataComplSelVar.csv; VARIABLE: NAMES ARE X1 M1 Y1 X2 M2 Y2 C1 C2; USEVAR = X1 M1 Y1 X2 M2 Y2 C1 C2; analysis: estimator = ml; bootstrap = 5000; model: M2 on X2 C2 (aa); M2 on X1@0(ap); M1 on X2@0 (ap); M1 on X1 C1 (aa); Y2 on M2 (ba); Y2 on M1 (bp); Y2 on X2 C2 (ca); Y2 on X1 (cp); Y1 on M2 (bp); Y1 on M1 (ba); Y1 on X2 (cp); Y1 on X1 C1 (ca); Y1 with Y2; X2 with X1; M2 with M1; Model indirect: Y2 ind X2; Y2 ind X1; Y1 ind X2; Y1 ind X1; output: stand; res; cinterval(bcbootstrap); 


This looks reasonable. Except, have only one parameter on each line with a label. And don't use WITH among the x's or c's  they are regular covariates. 

Sarah Arpin posted on Friday, September 01, 2017  8:36 am



Thank you for your fast response. When you say "have only one parameter on each line with a label", are you referring to the following (I've asterisked lines of the syntax that I edited based on your feedback): TITLE: APIMeM indistinguishable members DATA: FILE is DataComplSelVar.csv; VARIABLE: NAMES ARE X1 M1 Y1 X2 M2 Y2 C1 C2; USEVAR = X1 M1 Y1 X2 M2 Y2 C1 C2; analysis: estimator = ml; bootstrap = 5000; model: M2 on X2 (aa);****Person 2 IV on Person 2 Mediator M2 on C2 (aa);****covariate M2 on X1@0(ap); M1 on X2@0 (ap); M1 on X1 (aa);**** Person 1 IV on Person 1 Mediator M1 on C1 (aa);****covariate Y2 on M2 (ba); Y2 on M1 (bp); Y2 on X2 (ca);**** Person 2 IV on Person 2 Y Y2 on C2 (ca);****covariate Y2 on X1 (cp); Y1 on M2 (bp); Y1 on M1 (ba); Y1 on X2 (cp); Y1 on X1(ca); **** Person 1 IV on Person 1 Y Y1 on C1(ca); **** covariate Y1 with Y2; X2 with X1; M2 with M1; Model indirect: Y2 ind X2; Y2 ind X1; Y1 ind X2; Y1 ind X1; output: stand; res; cinterval(bcbootstrap); Thank you! 


Right. But you can write this M2 on X2 (aa); M2 on C2 (aa); more efficiently as (note: no semi colon at the end of the first line): M2 on X2 (aa) C2 (aa); 

Sarah Arpin posted on Friday, September 01, 2017  1:19 pm



This is so helpful. Thank you! 


I noticed that Sarah's syntax didn't include the correlation between the covariate (C) and the predictor (X). Is that not necessary to account for the covariate? 


Variables that appear only on the righthandside of ON are considered "X variables" and are allowed to correlate but their correlation is not part of the model (just like in regular regression). So this includes X2 and C2 of the example. 


My mistake. Thanks for clarifying! 

Sarah Arpin posted on Thursday, October 26, 2017  6:49 pm



Hello, I am having an issue running the syntax you suggested for including a control variable in an APIMeM model (indistinguishable dyads)  for context, see the discussion from September 1st, 2017. Specifically, you suggested that I could write the following: M2 on X2; M2 on C2; more efficiently as (note: no semi colon at the end of the first line): M2 on X2 C2; (C2 is my control variable). However, I get very different results when I run the model each way. When I run the model the first way (separate lines, two semicolons), I get the following output: M ON X 0.860 0.352 2.445 C2 ON X 0.405 0.149 2.722 Running the abbreviated version (with no semicolon) you suggest on separate lines outputs the following: M ON X 0.480 0.176 2.727 C2 0.043 0.037 1.176 Which is correct? Shouldn't they output the same results? Thank you! 


They should give the same result. Send your 2 outputs to Support along with your license number. 


Dear Mplus users, I'm currently building a multilevel actorpartner interdependence model (APIR) whereby 4 daily measurements are nested within each person of each dyad. I'm starting very simple, ignoring the dyad cluster (since it has no significant variation). I'm only declaring ID as a cluster and start with one simple relationship at the withinlevel (I declare nothing at the between). However, I get a saturated model. Do you know if there is a way to find out if this has to do with my sample size or is there any other way I could model the data to get model fit? Thank you! Best, Paris 


Have a look at the papers listed under Dyadic Analysis on our Mplus Papers page: http://www.statmodel.com/papers.shtml 

Back to top 