Multigroup analysis with 3 groups PreviousNext
Mplus Discussion > Structural Equation Modeling >
 Carmen-Maria Albrecht posted on Wednesday, June 27, 2012 - 5:12 am
Dear all,

I have a question regarding multigroup analysis with 3 groups when performing SEM.
When comparing the chi-square and df between the unconstrained and constrained model, is there a way to see if there is a significant difference between each of the groups (i.e., group 1 vs. 2; group 2 vs. 3; group 1 vs. 3)? And if so where can I see it in the output?
Or is it just possible to tell that there is an overall difference?

Thank you so much for your answer in advance.

 Linda K. Muthen posted on Wednesday, June 27, 2012 - 11:37 am
You would need to use just the data for groups 1 and 2, 1 and 3, and 3 and 3. You can do overall difference tests or test individual parameters. You can also use MODEL TEST.
 ellen posted on Sunday, September 09, 2012 - 11:27 pm
Hi Dr. Muthen,

I am trying to compare parameter estimates across 3 groups.
I heard that parameter differences can be tested by MODEL TEST in Mplus, but I am not sure how to write the Mplus language for MODEL TEST. Could you tell me what I should write in the input file for performing MODEL TEST to examine whether parameters are equal across groups? My model is:

GROUPING = race (1=African 2=Asian 3=Hispanic) ;



Rm By R1 R2 R3 ;
Ot By O1 O2 O3 ;
Sg By S1 S2 S3 ;
De BY D1 D2 D3 ;

Sg ON Rm ;
Sg ON Ot ;
Sg ON De ;
Rm WITH Ot ;

[Rm@0 Ot@0 Sg@0 De@0] ;

MODEL African:
MODEL Asian:
[R1 - D3] ;
MODEL Hispanic:
[R1 - D3] ;

The Multigroup Chi-square difference test was significant. However, it only tells me there is overall difference; it does not tell me whether certain parameters are invariant while others are non-invariant. Rather than doing overall difference tests or constraining each parameter one at a time, how do I write the MODEL TEST language to test for specific parameter differences? (For instance, if I want to see whether the parameters of "Sg ON Rm" and "Rm with De" are equivalent across groups?)
 Linda K. Muthen posted on Monday, September 10, 2012 - 6:36 am
You need to label the parameters you want to test. See the user's guide under MODEL CONSTRAINT to see how labeling is done. See MODEL TEST for an example of how to test using the labels.
 Meghan Schreck posted on Sunday, November 20, 2016 - 2:12 pm
Hi Dr. Muthen,

On Wednesday, June 27, 2012 - 11:37 am, you wrote:

You would need to use just the data for groups 1 and 2, 1 and 3, and 3 and 3. You can do overall difference tests or test individual parameters. You can also use MODEL TEST.

Di you mean "and 2 and 3" instead of "3 and 3"?

Thank you!
 Linda K. Muthen posted on Monday, November 21, 2016 - 5:18 pm
 Daniel Lee posted on Tuesday, January 17, 2017 - 12:51 pm
Hi Dr. Muthen,

I am conducting a multi-group LGM.

Is there a way to test if there is a significant difference in the slope of intercept terms between group 1 vs. group 2? So for example, slope in group 1 vs. slope in group 2.

Thank you!
 Linda K. Muthen posted on Tuesday, January 17, 2017 - 1:24 pm
You can label the two slopes you want to compare and create a diff parameters in MODEL CONSTRAINT using the labels. Or you can use the labels in MODEL TEST.
 Daniel Lee posted on Wednesday, January 18, 2017 - 5:19 pm
makes perfect sense. thank you!
 Lily Assaad posted on Tuesday, November 28, 2017 - 12:44 pm

I am testing measurement invariance across race (4 races) within an ESEM framework. My model has 5 latent factors and 25 indicators. I achieved scalar invariance so I wanted to compare the means of my 4 races for each of the 5 factors. I did so by changing my reference group multiple times so as to get all the possible 2-way t-tests. However, I got different results depending on which group was the reference group. For example, when Asians were the reference and Americans (as well as blacks and hispanics) were in the model, the mean estimate for factor 1 was significant for americans. However, when Americans were the reference group and Asians (along with blacks and hispanics) were in the model, the mean estimate for factor1 (between asians and americans) was no longer significant. Thus, I have 2 questions.
1) Do you know why this is happening with me?
2) Is there a way to run all the possible 2-way t-tests between all the means across all races?

 Tihomir Asparouhov posted on Tuesday, November 28, 2017 - 4:04 pm
1. It shouldn't happen. Send your example to As you change the reference group make sure the Log-likelihood value stays the same - if it is not the same then the models are not comparable like that.

2. You can use model constraint to form the differences between any two parameters. See User's Guide example 9.1 for how you can use model constraint.
You can also run just one group with dummy covariates for each race (it is not exactly the same model but worth looking into).
 Lily Assaad posted on Tuesday, November 28, 2017 - 5:29 pm
Thanks! I sent it!
 Tihomir Asparouhov posted on Thursday, November 30, 2017 - 7:05 pm
From the files you sent I can see that when you changed the reference group from A to W factor 4 and 5 switched places, so keep this in mind when you are comparing the means.

Also here is what happens when you change the reference group. Suppose A is the reference group and in group W the factor mean is M and the factor variance is V. if you switch A and W so that the W is the reference group the factor mean in A will be M/sqrt(V) and the factor variance will be 1/V.

In one case you are testing M=0 and in the other you are testing M/sqrt(V)=0. Both tests are logically equivalent and they will always yield the same conclusion asymptotically, however, they can have different p-values for finite sample size (this happens with maximum-likelihood estimation - it doesn't happen with Bayes). In most cases though the conclusion about significance doesn't change.

You can verify this yourself using code along these lines

model: f1-f2 by y1-y6 (*1);

model g2: f1-f2 (v1-v2); [f1-f2] (m1-m2);

model constraints: new(a1-a2);

You will be able to see that the significance of m1 and m2 is different from that of a1 and a2 which is the same as the one with reversed reference group.
 carlo di chiacchio posted on Friday, July 27, 2018 - 4:28 am
Dear all,

I'm running a multigroup path analysis with a complex sampling design by using brrs and fay's correction.

The analysis output alerts me that Chi-square is not availabe with replicate weights.

Since my main objective is to compare the two groups I have, is there any other method I can use to test configural and paths/parameter invariance? So far, I looked only to RMSEA.

Thank you in advance for your help

 Tihomir Asparouhov posted on Friday, July 27, 2018 - 2:02 pm
One possible path is to look at the significance of the differences between the model parameters across the groups
model g1: [y](m1);
model g2: [y](m2);
model constraint: new(d); d=m1-m2;
 carlo di chiacchio posted on Monday, July 30, 2018 - 1:01 am
Dear Prof. Asparouhov,

thank you so much for your immediate reply.
I will follow your suggestion.

Best regards,
 Nicole Watkins posted on Tuesday, June 18, 2019 - 10:57 am
I am conducting a longitudinal multigroup analysis and I would like to make comparisons between my two groups, males and females, on the intercept, slope, as well as the associations between a time-varying predictor and the outcome variable. I have therefore done the following:

model constraint:
new(ifm); ifm=if-im; !differences in intercept
new(s1fm); s1fm=s1f-s1m; !differences in slope 1
new(s2fm); s2fm=s2f-s2m; !differences in slope 2
new(d1fm); d1fm=d1f-d1m; !differences in assoc between divorce1 and dep1
new(d2fm); d2fm=d2f-d2m; !differences in assoc between divorce2 and dep2
new(d3fm); d3fm=d3f-d3m; !differences in assoc between divorce3 and dep3

model test:
0 = ifm;
0 = s1fm;
0 = s2fm;
0 = d1fm;
0 = d2fm;
0 = d3fm;

I am only seeing an overall Wald test in my output. However, I would like to test all of these separately. Is that possible? Or do I need to run this script individually for each test?
 Bengt O. Muthen posted on Tuesday, June 18, 2019 - 3:12 pm
You see the individual tests in the regular output under New parameters - it is the z-scores.
 Ugnė Paluckaitė posted on Tuesday, October 27, 2020 - 12:49 am
Dear Sir or Madam,

I'm running a theory-based mediation model with totally aggregated variables. I want to compare this model in 3 groups, however, I'm not sure what's the best way to do it. Basically, I want to see if the same theoretical model can be applied (or if it fits the data well) to 3 different groups.
Grouping option doesn't really answer my question because it doesn't tell me if the model fits the data in different groups. Should I compare the model in groups separately?
 Bengt O. Muthen posted on Tuesday, October 27, 2020 - 10:47 am
This sounds like a good general analysis strategy question for SEMNET.
Back to top
Add Your Message Here
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Options: Enable HTML code in message
Automatically activate URLs in message