2-level multinomial logit with random... PreviousNext
Mplus Discussion > Multilevel Data/Complex Sample >
 Yohan Choi posted on Sunday, September 02, 2018 - 2:41 pm
how to implement two-level multinomial logistic model with separate but correlated random effects in Mplus?

ex) y = (1, 2, 3)
independent variabels = x1, x2
cluster = pid

In stata,
gsem (2.y <- x1 x2 M1[pid]) ///
(3.y <- x1 x2 M2[pid]), ///
cov(M1[pid]*M2[pid]) mlogit
(in sem manual in Stata, example 41g)

How to implement this in Mplus?
 Bengt O. Muthen posted on Monday, September 03, 2018 - 1:49 pm
Try using these pieces in a Type=Twolevel run (see UG chapter 9 for general twolevel setups) using the example of a 3-category nominal y variable.

Nominal = y;
within = x1 x2;


y on x1 x2;
y#1 with y#2;

The between level can also regress the random effects y#1 and y#2 on a between-level covariate. or be used to predict some between-level DV (don't think Stata can do that).
 Yohan Choi posted on Monday, September 03, 2018 - 7:21 pm
Thanks professor.

I wonder that base category of y must be largest number.

Is it fixed in Mplus or changeable?
 Bengt O. Muthen posted on Tuesday, September 04, 2018 - 2:46 pm
Use Define to re-score the variable and thereby change the base category.
 Yohan Choi posted on Thursday, September 13, 2018 - 9:38 pm
Hello, Professor.
I did like the following, but confronted problems.

I represent a part. Y is (1,2,3,4,5)

usevariables=pid y yg11-yg14 yic11-yic14 x12-x31;
within=yg11-yg14 yic11-yic14 x12-x31;


y on yg11-yg14 yic11-yic14 x12-x31;
y#1 with y#2 y#3 y#4; y#2 with y#3 y#4; y#3 with y#4;

*** WARNING in MODEL command
One or more between-level covariances involving the following variable is free
while its between-level variance is fixed at 0. Fix all between-level covariances with this variable at 0 or free its variance. Problem with: Y#1

it's same for Y#2, Y#3

Between Level
Y#2 0.000
Y#3 0.000
Y#4 0.000

Y#3 0.000
Y#4 0.000

Y#4 0.000

Y#1 -4.226
Y#2 -8.726
Y#3 -8.248
Y#4 3.603

And I need constant's coefficients, but did not calculate that.

Sorry for seemingly basic questions.
I really need your help, professor.
 Bengt O. Muthen posted on Friday, September 14, 2018 - 1:30 pm
Add the mentioning of their variances:

y#1 - y#4;

But note that this results in 4-dimensional integration which is heavy, slow, and imprecise (you can try Integration = Montecarlo(5000). You may want to put a factor behind these 4 as shown in UG examples for 2-level mixture modeling (the latent class variable is also nominal).
 Yohan Choi posted on Friday, September 14, 2018 - 6:57 pm
Thanks professor.
Very thanks for your kind reply.

I have one more question.
Can I have predicted probability with 95% CI with some fixed covariates in this model?
 Bengt O. Muthen posted on Sunday, September 16, 2018 - 12:02 pm
You can get that using Model Constraint to express the estimated logits in terms of probabilities (see e.g. end of UG chapter 14).
 Yohan Choi posted on Monday, September 17, 2018 - 6:12 pm
Thanks Muthen.

There are another proper methods to reduce convergence time?
 Bengt O. Muthen posted on Tuesday, September 18, 2018 - 5:48 pm
Only the 2 suggestions I made.
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