Multigroup logistic regression PreviousNext
Mplus Discussion > Categorical Data Modeling >
Message/Author
 Anonymous posted on Monday, May 23, 2011 - 7:59 am
I am trying to fit a multigroup logistic model with survey data (weights/stratification). The groups are countries (con). If I specify
the following core commands:

Data:
ngroups=10;

Variable:
grouping is con (1=a 2=b ...10=j);
usevariables are outcome age_c weight strata con;
categorical are outcome ;
weight is weight;
stratification is strata;

Analysis:
type=complex;
estimator= mlr;
link=logit;

Model:
anymood12 on age_c;

I get the error message:
*** ERROR in ANALYSIS command
ALGORITHM=INTEGRATION is not available for multiple group analysis.
Try using the KNOWNCLASS option for TYPE=MIXTURE.

Can anyone advise please? Thanks.
 Linda K. Muthen posted on Monday, May 23, 2011 - 9:12 am
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:

DATA: FILE IS C:\Users\eunjee\desktop\150411_1834.asc;
VARIABLE:
NAMES ARE PID gen1 age1 age1_4g edu1 inc1 tw1
dddd1 dddd2 dddd3 dddd4 dddd5 dep1 ase1 cd1 fsr1 sh1 adl1
exe1 smoke1 alc1 alc1_r alc1_r2 breakfast1;

classes is C (2);
KNOWNclass is C (gen1 = 0 gen1 = 1);

MISSING ARE ALL (-99) ;
USEOBS ARE (age1_4g le 2);


USEVARIABLES ARE
age1 edu1 tw1 dep1 ase1 cd1 fsr1 sh1 adl1
dddd1 dddd2 dddd3 dddd4 dddd5 exe1 lninc1 ;
!NOMINAL IS ;
CATEGORICAL IS exe1;

DEFINE:
lninc1 = ln(inc1+1000);

ANALYSIS:
TYPE=MIXTURE;


MODEL:
%OVERALL%
exe1 on age1 edu1 lninc1 tw1 dep1 ase1 cd1 fsr1 sh1 adl1;
exe1 on dddd1 dddd2 dddd3 dddd4 dddd5;

Output: sampstat standardized;

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?

Thank you.
 Linda K. Muthen posted on Saturday, April 11, 2015 - 6:12 am
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?

Thank you.
 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.

Thank you very much.
 Linda K. Muthen posted on Monday, April 13, 2015 - 4:25 pm
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)?
 Linda K. Muthen posted on Tuesday, April 14, 2015 - 11:16 am
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.
 Bengt O. Muthen posted on Thursday, May 18, 2017 - 4:18 pm
To answer this one we have to see your full output. Please send to Support along with your license number.
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: