Comparing within-subjects coefficients
Message/Author
 Ali H. posted on Wednesday, February 08, 2017 - 9:01 am
Hello,

How would you perform a within-subject comparison in SEM?

Let's say that I want to examine the regression path from IQ to Grades in 3 school subjects (math, English, sports). And let's say that I expect the coefficient to be stronger between IQ and math, and weaker between IQ and sports. How can I test this?

I can't use multiple-group SEM here because I don't have different groups. My data comes from one group only. Is there a special feature in Mplus to compare two coefficients (or a formula that I can use)? Thanks!
 Bengt O. Muthen posted on Wednesday, February 08, 2017 - 3:55 pm
Just label the 2 slopes b1 and b2 in the Model command and then use

Model Constraint:
New(diff);
diff = b1-b2;
 Research Research posted on Wednesday, April 04, 2018 - 10:54 pm
Hello,
I have a follow-up question of this.

If I have standardized coefficients for the regression path from (0.5)IQ and math, and (0.3)IQ and Sports, can I say there is strong association between IQ and math because 0.5>0.3 and they are all standardized coefficients?

Thank you so much
 Bengt O. Muthen posted on Thursday, April 05, 2018 - 2:31 pm
This general analysis question is suitable for SEMNET.
 Amelia Zhai posted on Wednesday, April 18, 2018 - 8:33 pm
Hi Muthen
I want to compare the coefficient of M1's influence on s1 and s2, with control variables c1(company's type, dummy variable) and c2, but the result shows error, could you tell my what's wrong with my command?

INPUT INSTRUCTIONS

TITLE:csr regression
DATA:FILE IS csr.dat;
VARIABLE:NAMES ARE m1-m4 s1 e1-e3 s2 e4-e11 c1-2;
USEVARIABLES ARE m1 s1 s2 c1-2;
MISSING=ALL(9)
DEFINE:
t1=0;
if (c1 EQ 1) then t1=1;
t2=0;
if (c1 EQ 2) then t2=1;
t3=0;
if (c1 EQ 3) then t3=1
MODEL:
t1 t2 t3 c2;
s1 ON m1 t1 t2 t3 c2 (p1)
s2 ON m1 t1 t2 t3 c2 (p2)
MODEL CONSTRAINT:
New(diff);
diff=p1-p2
OUTPUT:Standardized;

*** ERROR
Unable to expand: C1-2

Thanks,
Amelia
 Amelia Zhai posted on Thursday, April 19, 2018 - 1:38 am
Apologize, have noticed the variable problem of c1-2
 Amelia Zhai posted on Thursday, April 19, 2018 - 2:13 am
Hi Muthen,

I wonder how to compare the coefficient difference between two multiple linear regression?

for example here are two equations:
y1=b0+b1x1+b2x2+e
y2=bo+b3x1+b4x2+e

How can I compare the difference of b1-b3, and b2-b4?

I noticed your answer above to label, but now I have more than one independent variables in each regression. I tried to do it but it seems wrong.

INPUT INSTRUCTIONS

TITLE:csr regression
DATA:FILE IS csr.dat;
VARIABLE:NAMES ARE m1-m4 s1 e1-e3 s2 e4-e11 c1-c2;
USEVARIABLES ARE m1-m4 s1 s2 c1-c2;
MISSING=ALL(9);
DEFINE:
t1=0;
if (c1 EQ 1) then t1=1;
t2=0;
if (c1 EQ 2) then t2=1;
t3=0;
if (c1 EQ 3) then t3=1;
MODEL:
c1 c2;
s1 ON m1 (p1) m2 (p2) m3 (p3) m4 (p4) c1 c2;
s2 ON m1 (p7) m2 (p8) m3 (p9) m4 (p10) c1 c2;
MODEL CONSTRAINT:
New(diff);
diff=p1-p7;
diff=p2-p8;
diff=p3-p9;
diff=p4-p10;
OUTPUT:Standardized;

*** ERROR in MODEL command
Unknown variable(s) in an ON statement: (P1)

Amelia
 Bengt O. Muthen posted on Thursday, April 19, 2018 - 4:25 pm
Have just one label per line.
 Amelia Zhai posted on Thursday, April 19, 2018 - 7:33 pm
Thank you Muthen, then my following question is how could I compare each coefficient in the multiple linear regression, since I can only have one lable per line?

And what does the comparsion mean if I compare the two labels between two multiple linear regression? I think it does noe refer to a single coefficient?

Amelia
 Bengt O. Muthen posted on Friday, April 20, 2018 - 2:52 pm
This doesn't restrict you. Just write for example:

s1 ON m1 (p1)
m2 (p2)
m3 (p3)
m4 (p4)
c1 c2;

and then use the diffs you had in Model Constraint.