The model did not run properly in MLwiN. Re-run the model without the nopause option to debug the model in MLwiN.

Welcome to the forum for runmlwin users. Feel free to post your question about runmlwin here. The Centre for Multilevel Modelling take no responsibility for the accuracy of these posts, we are unable to monitor them closely. Do go ahead and post your question and thank you in advance if you find the time to post any answers!

Go to runmlwin: Running MLwiN from within Stata >> http://www.bristol.ac.uk/cmm/software/runmlwin/
Post Reply
alirizvi29
Posts: 4
Joined: Sat May 13, 2023 10:07 am

The model did not run properly in MLwiN. Re-run the model without the nopause option to debug the model in MLwiN.

Post by alirizvi29 »

Hi,

I am trying to run a four-level model in Stata using "runmlwin' command. Here is the Stata syntax:

use "D:\refuseData.dta", replace
drop if refuse==. | caste==. | religion==. | v190==. | urban==. | age==. | schooling==. | working==. | media==. | parity==. | living_son==.
sort v024 v001 intrid womenid
global MLwiN_path "C:\Program Files (x86)\MLwiN trial\i386\mlwin.exe"

*Fit a Four-level variance components logit model by PQL2
quietly runmlwin refuse cons i.caste i.religion i.v190 urban age i.schooling working media parity living_son, level4(v024: cons) level3(v001: cons) level2(intrid: cons) level1(womenid:) discrete(distribution(binomial) link(logit) denom(cons) pql2) nopause mlwinsettings(optimat) noversioncheck

* Fit the previous model by MCMC using the PQL2 estimates from the previous model as starting values for MCMC estimation.
runmlwin refuse cons i.caste i.religion i.v190 urban age i.schooling working media parity living_son, level4(v024: cons) level3(v001: cons) level2(intrid: cons) level1(womenid:) discrete(distribution(binomial) link(logit) denom(cons)) mcmc(cc burnin(5000) chain(5000)) initsprevious mlwinsettings(optimat) nopause noversioncheck


I am getting the following response to the model:
The model did not run properly in MLwiN. Re-run the model without the nopause option to debug the model in MLwiN.

But if I remove the 'nopause' option then I don't get results in Stata. Can you please help me out in the matter?
Thank you in advance.
ChrisCharlton
Posts: 1348
Joined: Mon Oct 19, 2009 10:34 am

Re: The model did not run properly in MLwiN. Re-run the model without the nopause option to debug the model in MLwiN.

Post by ChrisCharlton »

Is it the first or second of your two model fits that triggers the error? If it is the first have you checked whether switching from pql2 to mql1 allows it to fit?
alirizvi29
Posts: 4
Joined: Sat May 13, 2023 10:07 am

Re: The model did not run properly in MLwiN. Re-run the model without the nopause option to debug the model in MLwiN.

Post by alirizvi29 »

Thank you for your response!

Earlier, I tried to switch from pql2 to mql2 estimation, but the problem persisted. However, It is solved after removing some units at v001 at a level with no variation, which means a unit had all responses either 1 or 0. Because of this, it couldn't converge.
alirizvi29
Posts: 4
Joined: Sat May 13, 2023 10:07 am

Re: The model did not run properly in MLwiN. Re-run the model without the nopause option to debug the model in MLwiN.

Post by alirizvi29 »

Now I am trying to get some graphical representation of the results as the tables are too large, and I have many other outcome variables. Here is the code for the model again.

*Fit a Four-level variance components logit model by PQL2
quietly runmlwin faith_b cons i.caste i.religion i.v190 urban age i.schooling working media parity living_son, level4(v024: cons) level3(v001: cons) level2(intrid: cons) level1(womenid:) discrete(distribution(binomial) link(logit) denom(cons) pql2) nopause mlwinsettings(optimat) noversioncheck

* Fit the previous model by MCMC using the PQL2 estimates from the previous model as starting values for MCMC estimation.
runmlwin faith_b cons i.religion i.v190 urban age i.schooling working media parity living_son, level4(v024: cons) level3(v001: cons) level2(intrid: cons) level1(womenid:) discrete(distribution(binomial) link(logit) denom(cons)) mcmc(cc burnin(5000) chain(5000)) initsprevious mlwinsettings(optimat) nopause noversioncheck


Can you please guide me on getting some graphs to visualize these results in Stata?
Thank you in Advance!
Post Reply