Page 1 of 1

stata imputed data in mlwin

Posted: Wed Mar 15, 2017 5:13 pm
by rodrigowu
Hi folks,

I met some problem when I used runmlwin with multiply imputed data (done by stata mi command).
My command is like this, a very simple one:
sort commid idind2 wave
mi est, cmdok noi sav(mlw, replace): runmlwin phi cons, level3(commid: cons) level2(idind2: cons) level1(wave) discrete(distribution(binomial) ///
link(logit) denom(cons) mql1) forcesort

but error message showed:
"The data must be sorted according to the order of the model hierarchy: commid idind2 wave.
an error occurred when mi estimate executed runmlwin on m=1
no results will be saved"

I read the post and followed all solutions on it:
https://www.cmm.bristol.ac.uk/forum/vie ... php?t=1030
However, I received another error message:
"mi estimate: omitted terms vary
The set of omitted variables or categories is not consistent between m=1 and
m=2; this is not allowed. To identify varying sets, you can use mi xeq to run
the command on individual imputations or you can reissue the command with mi
estimate, noisily
no results will be saved"

Actually, checking one by one, the numbers of obs. in the equation for m1 and the equation for m2 is the same.
Why I was told "omitted terms vary"? Is it not allowed to use stata-imputed data in Mlwin?
thank you very much!

Re: stata imputed data in mlwin

Posted: Fri Mar 17, 2017 9:57 am
by ChrisCharlton
In order to narrow down where this might be happening can you confirm whether the same problem occurs if you use Stata's built-in logit command?

Re: stata imputed data in mlwin

Posted: Tue Mar 21, 2017 3:46 pm
by rodrigowu
Hi Chris,

Thank you very much for your reply.
I can confirm that there is no such problem if I use melogit command in Stata. The problem of Stata is the low-efficient maximum likelihood estimation, which can take dozens of days to estimate random slopes. MCMC in MLwin would be faster than ML. I should have used Realcom-imputed data in MLwin, but I have used Stata-imputed data in other models. It seems inappropriate to use different imputed data in one project. That is why I am keen to transfer Stata-imputed data to MLwin.

Re: stata imputed data in mlwin

Posted: Thu Mar 23, 2017 2:27 pm
by GeorgeLeckie
Dear Rodrigo,

Suggest you run the mo estimate command with the noisily option and inspect each set of model results.

It may well be the case that one of your variance components gets stuck on zero on one or more iterations.

mi estimate then complains as it assumes that the parameter stuck on zero has been omitted from the model altogether, hence the error message.

However, more generally, I don't think you would want to report the results of a multilevel model where one of the variance components was stuck on zero; the results are not trustworthy. For the same reason, you would not want to include those model results in the set which you aggregate over using Rubin's rules to generate the combined estimates.

Suggest you explore the above and consider simplifying your model if you are getting variance parameters stuck on zero.

Best wishes

George

Re: stata imputed data in mlwin

Posted: Thu Mar 23, 2017 6:36 pm
by rodrigowu
Dear George,

Thank you very much for your help. I will look through these iterations as you suggested.

Best wishes,

Rodrigo