Instead of the GROUPING option, you need to use the KNOWNCLASS and CLASSES options. This requires TYPE=MIXTURE. See Example 8.8 which shows how to set this up. When classes are known, it is the same as multiple groups based on an observed variable.
EunJee Lee posted on Saturday, April 11, 2015 - 3:40 am
Dear Dr.Muthen, I am trying to analyze data using multi group logistic regression. I specified my model like this:
I got odds ratio, beta, and p-value for each group. My question is how I can get the group difference test result such as wald test. Could I get any information about the significance of group difference from here? If not, how can I modify or conduct multi group logistic regression model with model test?
You can use MODEL TEST to get the Wald test. You would need to specify the parameters you want to test in the class/group specific parts of the MODEL command,for example, %c#1% and %c#2. Then label the parameters and use the labels in MODEL TEST. See MODEL TEST in the user's guide for more information.
EunJee Lee posted on Monday, April 13, 2015 - 1:50 pm
Thank you very much. As following your directions, I got wald test results. May I ask you another question?
I have 10 control variables and 5 independent variables. In order to explore gender difference in the effects of the independent variables, I did model test five times, estimating only a path freely and other parameters constrained each time. As natural results, different coefficients and p-values of the variables were revealed in 5-each output. For example, one of independent variable was not significant when all variables were estimated freely, but when contrained others for model test, it was significant in one group and wald test result was also significant.
In this case, which result do I have to report? I think the results in which all parameters were freely estimated should be reported and only wald test results were considered in outputs constraind parameters. Is it right?
EunJee Lee posted on Monday, April 13, 2015 - 2:16 pm
And I also wonder that I should conduct model test at once for 5 independent variables or do the test 5 times each when the variables are dummy coded from one categorical variable.
Whether you test separately or together depends on whether you want a single or joint test. This is your decision.
You should not use labels that constrain parameters to be equal. You should label the parameters separately and test their differences in MODEL TEST.
EunJee Lee posted on Monday, April 13, 2015 - 8:29 pm
I constrained parameters to be equal between groups to know the group difference in the effect of dddd5 like below:
%OVERALL% alc1_r on age1 edu1 lninc1; alc1_r on dddd1 dddd2 dddd3 dddd4 dddd5;
%c#1% alc1_r on age1(1) edu1(2) lninc1(3);
alc1_r on dddd1(11) dddd2(12) dddd3(13) dddd4(14) dddd5(a);
%c#2% alc1_r on age1(1) edu1(2) lninc1(3);
alc1_r on dddd1(11) dddd2(12) dddd3(13) dddd4(14) dddd5(b); model test: a=b;
I repeated this for each independent variables, dddd1-dddd5.
1) Is it wrong? Should I remove the numbers in parenthesis and not constrain other parameters between groups?
2) And after I check the wald test results, which estimates should I report, results from analyses with model test(output of input above) or from analyses with no constraints and model test(no numbers and labels in parenthesis)?
Unless you want the parameters constrained as part of your model, you should not constrain them to use MODEL TEST. Following is an example of how to test if alcl_r on age1 is equal across classes:
MODEL: %overall% alc1_r on age1 edu1 lninc1; %c#1% alc1_r on age1 (p1) edu1 lninc1; %c#2% alc1_r on age1 (p2) edu1 lninc1;
MODEL TEST: 0 = p1 - p2;
EunJee Lee posted on Tuesday, April 14, 2015 - 7:44 pm
Thank you for your kind descriptions. Thank you very much.
zhuopei Hu posted on Thursday, May 18, 2017 - 10:45 am
Hi, I was using logistic regression with knowngroup in my study. In order to compare the estimate in different group, I used the codes below. After the model was run, I didn't see any warning/error regarding "MODEL TEST" and didn't have any result. Looks like the statement was ignored.
ANALYSIS: TYPE = MIXTURE; MODEL: %overall% OBESITY on SEX race2 race3 race4 MSA pa_cont year2003 year2007 (o1-o8); %g#1% OBESITY on SEX race2 race3 race4 MSA pa_cont year2003 year2007 (a1-a8); %g#2% OBESITY on SEX race2 race3 race4 MSA pa_cont year2003 year2007 (l1-l8); %g#3% OBESITY on SEX race2 race3 race4 MSA pa_cont year2003 year2007 (m1-m8);
MODEL TEST: 0 = a1 - l1;
Can anyone help? My MPlus version is 7.4. Thank you very much.