Model constraint - new variable PreviousNext
Mplus Discussion > Structural Equation Modeling >
Message/Author
 Mplus User posted on Wednesday, May 31, 2017 - 10:47 am
I have a mediation model, and I'm interested in testing whether two mediation effects are significantly different from each other in magnitude. I use the Model Constraint method to create a new variable "diff" (see below). I also requested for standardized effects (stdyx). The Mplus output provides standardized and unstandardized coefficients for all my variables except diff, in which only an unstandardized coefficient was provided. I also tried using bias-corrected bootstrapping, but again, only an unstandardized coefficient was provided. Is there a way to obtain the standardized coefficient for the new variable, diff?

MODEL CONSTRAINT:
NEW (ind_1 ind_2 );
ind_1 = a1*b1;
ind_2 = a2*b2;

NEW (diff);
diff = ind_1 - ind_2;
 Bengt O. Muthen posted on Wednesday, May 31, 2017 - 5:46 pm
You have to express the standardization yourself in Model Constraint. That is, express the standardized version of ind_1 and ind_2 and then express the difference.
 Mplus User posted on Thursday, June 01, 2017 - 10:01 am
Thank you so much, Bengt. This is probably a dumb question -- how do I create a standardized version of ind_1 and ind_2?

MODEL CONSTRAINT:
NEW (ind_1 ind_2 );
ind_1 = a1*b1;
ind_2 = a2*b2;

NEW (diff);
diff = ind_1 - ind_2;
 Mplus User posted on Thursday, June 01, 2017 - 10:42 am
I tried to answer my own question. Does this syntax create a standardized version of the two indirect effects? This is based on equation 9 in Preacher and Kelly (2011). I multiplied path a and path b by the standard deviation of X (.744) divided by the standard deviation of y (2.911). Is the syntax below correct?

MODEL CONSTRAINT:
NEW (ind_1 ind_2);
ind_1 = a1*b1*.744/2.911;
ind_2 = a2*b2*.744/2.911;

NEW (diff);
diff = ind_1 - ind_2;
 Bengt O. Muthen posted on Thursday, June 01, 2017 - 6:56 pm
The formula is right but when you insert numbers like this (e.g..744) you are not taking into account sampling error. You need to express the SDs in model parameter terms.
 Mplus User posted on Thursday, June 01, 2017 - 9:17 pm
How do I express the SD in model parameter terms?
 Bengt O. Muthen posted on Friday, June 02, 2017 - 1:42 pm
For instance,

Model:

....
x (varx);
y on x (b);
y (resvary);

Model Constraint:

New(sd);

sd = sqrt(b*b*varx+resvary);
 Irina Patwardhan posted on Tuesday, December 26, 2017 - 8:05 am
Hi everyone,

I am using a MODEL CONSTRAINT statement to estimate group differences in all paths in the multiple group model. The model works fine, but I don't understand how to interpret the output, what kind of statistics is calculated with the model constraint?

model:
DIFtas on Risk8;

MODEL MALE:

DIFtas on Risk8(p1) ;

MODEL FEMALE:

DIFtas on Risk8(p1f) ;

model constraint:
new diff1 (and so on for each of the 27 paths);

diff1=p1-p1f;

and I then get the estimates, SE, and p-values for the new/additional parameters in the bottom of my ouptput.

DIFF1 (Estimate= -0.142) (SE=0.129)(ESt/SE=-1.105)(p-value=0.269)


What kind of statistics is reported with the estimate? Looks like a Beta to me, is it correct?
 Bengt O. Muthen posted on Tuesday, December 26, 2017 - 4:08 pm
Like all parameters in the Model command, your p1 and p1f parameters are unstandardized regression coefficients. Diff1 is their difference.
 Rosa Mindeguia Petrirena posted on Monday, May 07, 2018 - 2:59 am
Dear Munthen,

I have a moderated mediation model, I use a the Model Constraint method to create new variables of indirect effects "IND_HI; IND_LO" (see below). I also requested for standardized effects (stdyx). The Mplus output provides standardized and unstandardized coefficients for all my variables except the new variables. Is there a way to obtain the standardized coefficient for the indirect effects?

MODEL CONSTRAINT:

NEW(LOW_TC HIGH_TC IND_LOWTC IND_HITC TOT_LOWTC TOT_HITC);
LOW_TC = 2;
HIGH_TC = 5;
IND_LOWTC = a1*b1 + a1*b3*LOW_TC;

IND_HITC = a1*b1 + a1*b3*HIGH_TC;

TOT_LOWTC = IND_LOWTC + cdash;

TOT_HITC = IND_HITC + cdash;

PLOT(LOMOD HIMOD);
LOOP(XVAL,1,6,.01);
LOMOD = IND_LOWTC*XVAL;

HIMOD = IND_HITC*XVAL;

PLOT: TYPE = plot2;

OUTPUT: STANDARDIZED CINTERVAL (BOOTSTRAP) TECH8;
 Bengt O. Muthen posted on Monday, May 07, 2018 - 5:37 pm
There is no way for Mplus to know what quantities you have in Model Constraint, so no way to standardize. You have to do it yourself in Model Constraint by using variances based on parameter labels in the Model command.
 Dayuma Vargas posted on Tuesday, August 21, 2018 - 12:26 pm
Hello everyone,

I am trying to use MODEL CONSTRAINT to assess differences in distal outcomes across profiles in a LTA. I am using the manual 3-step approach. However, I am getting an error message (Unknown parameter label in MODEL CONSTRAINT) and I cannot see where the problem in my syntax is. I wonder if a different pair of eyes may find it. Thank you in advance to all!

Here is the relevant syntax:

CLASSES ARE T1(4) T2(4);
NOMINAL ARE T1_N_LTA T2_N_LTA;

ANALYSIS:
TYPE IS mixture;
ESTIMATOR IS MLR;

MODEL:
%Overall%
T2 ON T1;
T1 ON esexe (r1-r3);
T2 ON esexe (r1-r3);

Model T1:
%T1#1%
[T1_N_LTA#1@4.299];
[T1_N_LTA#2@6.586];
[T1_N_LTA#3@3.982];

[e5ext] (aa1);
[e5iden] (aa2);
[e5inti] (aa3);

%T1#2%
[T1_N_LTA#1@1.542];
[T1_N_LTA#2@-1.578];
[T1_N_LTA#3@-0.808];

[e5ext] (ab1);
[e5iden] (ab2);
[e5inti] (ab3);

...

MODEL CONSTRAINT:

New(ext_12);
ext_12=aa1-ab1;

...

*** ERROR Unknown parameter label in MODEL CONSTRAINT: AA1
 Bengt O. Muthen posted on Tuesday, August 21, 2018 - 6:11 pm
Send your full output to Support along with your license number.
 Jordan posted on Tuesday, September 11, 2018 - 12:23 pm
Hello,

I've noticed that when I use a Model Constraint command (in this case, to estimate conditional indirect effects), the beta parameters of the model change drastically. Are these valid, or should I only pay attention to the beta parameters when running the model without the model constraint command? (Relatedly, I've noticed that the fit indices are markedly different as well;i.e., poorer fitting).

Thanks
 Bengt O. Muthen posted on Tuesday, September 11, 2018 - 2:30 pm
I can't see that happening. Please send both outputs to Support along with your license number.
 Rosa Mindeguia Petrirena posted on Monday, November 05, 2018 - 3:28 am
Hello Mrs and Mr Munthen,

We are working on the syntaxis that I posted below:

D_LT BY DLV DLG DLP DLS;
B_LT BY LG LP LS LV;
B_LT ON D_LT (cdash);
B_LT ON TEI (b1);
B_LT ON ZPAS (b2);
B_LT ON ZCONF (b3);
B_LT ON ZAGR (b4);
TEI ON D_LT (a1);
ZPAS ON D_LT (a2);
ZCONF ON D_LT (a3);
ZAGR ON D_LT (a4);
ZPAS ON TEI (d1);
ZCONF ON TEI (d2);
ZAGR ON TEI (d3);

MODEL CONSTRAINT:

NEW(a1b1 a2b2 a1d1b2 a3b3
a1d2b3 a4b4 a1d3b4 );

a1b1= a1*b1;
a2b2=a2*b2;
a1d1b2= a1*d1*b2;
a3b3=a3*b3;
a1d2b3=a1*d2*b3;
a4b4 =a4*b4;
a1d3b4=a1*d3*b4;

Taking into account these, we are trying to standardyze an indirect effect of two (non-parallel) mediators. Which is the best option to standardyze the indirect effects of these model?

Thanks,
 Bengt O. Muthen posted on Monday, November 05, 2018 - 3:58 pm
It looks like your X variable is D_LT and your Y variable is B_LT, in which case you should multiply your indirect effect with sqrt[V(D_LT)] and divide by sqrt[V(B_LT)]. So in Model Constraint you have to express those 2 variances in terms of model parameter labels.
 Qiong Wu posted on Tuesday, April 23, 2019 - 7:00 pm
Dear Drs. Muthen,

I am using a three-step LCA to estimate coefficients in an APIM model. However, I'm getting error messages that I did not get when I was running a regression (i.e., a half of the APIM, only one direction instead of two directions).

MODEL:
%OVERALL%
mt4moc ON mt1sasc mt1moc ;
mt4sasc ON mt1sasc mt1moc ;
mt1sasc mt1moc;

%c#1%
mt4moc ON mt1sasc(bcc1)
mt1moc(bmm1);
[mt4moc](mm1);
[mt1sasc](acc1);
[mt1moc](amm1);

mt4sasc ON mt1sasc(bc1)
mt1moc(bm1);
[mt4sasc](m1);
[mt1sasc](ac1);
[mt1moc](am1);

...
Model constraint:

NEW (ddN4mm1);

ddN4mm1 = mm1+acc1*bcc1+amm1*bmm1;


*** ERROR
Unknown parameter label in MODEL CONSTRAINT: ACC1

Could you give me some suggestions?
 Bengt O. Muthen posted on Wednesday, April 24, 2019 - 4:58 pm
We need to see your full output - send to Support along with your license number.
 Madison Aitken posted on Friday, June 21, 2019 - 1:53 pm
Dear Drs. Muthen,

I am reporting standardized results (STDY) for a model. However, I am also using Model Constraint to compare some of the coefficients and I understand that Model Constraint uses the unstandardized coefficients as inputs. Do you see this as an issue? Is it necessary to convert the coefficients into standardized values within the Model Constraint command first, in order to obtain accurate/consistent results?

Thank you in advance for any guidance you can offer.
 Bengt O. Muthen posted on Saturday, June 22, 2019 - 6:50 am
In general, you do want to compare unstandardized coefficients to not also be influenced by variance differences. It depends on your research question really.
 Christoph Schaefer posted on Friday, November 01, 2019 - 6:49 am
Dear Professors,

Regarding the standardization of coefficients, you are mentioning above that one needs "to express the SDs in model parameter terms." I am now wondering how to get the SD for y in the case of a multiple regression analysis.
You were giving the example for a simple regression:
"sd = sqrt(b*b*varx+resvary)". How would one express the SD of y in terms of model parameters (possibly in terms of sqrt(R^2 + resvary)) in the case of a multiple regression, please?
 Bengt O. Muthen posted on Friday, November 01, 2019 - 5:24 pm
With 2 x's, you replace the expression in parentheses by

b1*b1*varx1+b2*b2*varx2+2*b1*b2*covx1x2
 mboer posted on Wednesday, July 22, 2020 - 4:53 am
Dear Prof. Muthen,

I'm doing twolevel logistic regression on imputed data. I would like to compute odds ratios for the within-level effects using the following syntax:

MODEL: %WITHIN%
d_fight ON mig1 (b1)
mig2 (b2)
female age (c1 c2);

%BETWEEN%
d_fight;

MODEL TEST: b1=b2;

! Odds ratios
MODEL CONSTRAINT: new(ormig1 ormig2 orfem orage);
ormig1 = exp(b1);
ormig2 = exp(b2);
orfem = exp(c1);
orage = exp(c2);

I noticed that models with and without computation of odds ratios have slightly different loglikelihood (as wel as aic, bics). This leads to the following question: does adding variables through the model constraint option change loglikelihood? And if so, why?

Thank you in advance.
 Bengt O. Muthen posted on Thursday, July 23, 2020 - 8:28 am
It does not affect the loglikelihood, except for possibly tiny differences due to numerical imprecision. These differences can be avoided by sharpening the convergence criterion and/or by adding more integration points. Also read the FAQ on our website:
TECH8 – negative ABS changes

If this doesn't help, send your output to Support along with your license number.
 Marcus Pietsch posted on Sunday, September 06, 2020 - 9:30 am
Hello,

I estimate a mediation model with control variables (based on imputed data) but I am not sure how to calculate the sd for standardizing the indirect effect in that case. Could you please provide an example how to estimate sd in that (rather complex) case.

Thank you!

Model:

explort1 on explort0 (a1);
explort1 on exploit0 (a2);
explort1 on ambbal0 (a3);

!control variables;
explort1 on f3 nf4 ws foe as;

dv on explort1 (d3);

!control variables;
dv on f3 nf4 ws foe as;

explort0 (a);
exploit0 (b);
explort1 (c);
ambbal0 (e);

dv (y);

Model Constraint:

!unstandardized effects;

NEW (a1d3 a2d3 a3d3);

a1d3 = a1*d3;
a2d3 = a2*d3;
a3d3 = a3*d3;

!standardized effects;
!???
 Bengt O. Muthen posted on Monday, September 07, 2020 - 3:42 pm
You divide the indirect effect by the SD of your DV and multiply by the SD of your X variable. To get the values, you can either express the model-estimated variances in Model Constraint or just plug in the values from either sample data or the estimated variances.
 Thomas Kramer posted on Thursday, October 15, 2020 - 1:17 pm
Can I get a little more detail? How could I express the model-estimated variances in the Model Constraint? I'm trying to get standardized values for my model constraint:

MODEL CONSTRAINT:
NEW (Lov HiV vsd a05 b020 d020
wloslope wlofirst wlosecond wlodirect wloindir wlototal wloerror
whislope whifirst whisecond whidirect whiindir whitotal whierror
wFirstDiff wSeconDiff wDirDiff wIndDiff wTotDiff wSlopeDiff
tloslope tlofirst tlosecond tlodirect tloindir tlototal tloerror
thislope thifirst thisecond thidirect thiindir thitotal thierror
tFirstDiff tSeconDiff tDirDiff tIndDiff tTotDiff tSlopeDiff );

vsd = SQRT(varv);
Lov = vmean-vsd;
HiV = vmean+vsd;
a05=0;
b020=0;
d020=0;

wloslope = (bx20)+ ax5*(bm20 + (bmv20*Lov));
wloFirst = (ax5);
wloSecond = (bm20) + (bmv20*Lov);
wlodirect = bx20;
wloIndir = wlofirst*wlosecond;
wlototal = wlodirect + wloindir;
wloerror = ey20+(bm20*em5);

OUTPUT: STDYX sampstat ;
 Bengt O. Muthen posted on Thursday, October 15, 2020 - 4:09 pm
If you have the regression model

y on x (p1);
y (p2);
x (p3);

You express the SD of y in Model Constraint as

sdy = sqrt(p1*p1*p3 + p2);
Back to top
Add Your Message Here
Post:
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action: