Page 1 of 1

Unhandled exception - optimat doesn't work

Posted: Mon Dec 09, 2013 12:10 pm
by mujaheedshaikh
Sorry to bother you people, but I think you can help me out with this. I am trying to run a multilevel ordered probit modelusing runmlwin. I was initially getting an error message saying unhandled exception. I went through the forum and found your answer to it. I used optimat but then now it says "not enough memory". I don't know how to proceed with this. My sample is around 75000 observations and 33 independent variables. Is it a problem because of the size of the data? Is there a way around this? I would be very grateful to you if you can help me with this. Thanks!

Re: Unhandled exception - optimat doesn't work

Posted: Mon Dec 09, 2013 2:00 pm
by ChrisCharlton
If MLwiN is having problems allocating memory for your model and you have a 64bit operating system then you could try setting your Stata MLwiN path to the 64bit scripting version of MLwiN. This is called mlnscript.exe and is located in the x64 subdirectory where you installed MLwiN.

Re: Unhandled exception - optimat doesn't work

Posted: Tue Dec 10, 2013 2:27 pm
by mujaheedshaikh
Thanks for your reply. I tried it but it says this..the commands I used are below with the errors.
global MLwiNScript_path "C:\Program Files (x86)\MLwiN v2.28\x64\mlnscript.exe"

runmlwin swb cons, level2(countryid: (cons, contrast(10))) level1(id) discrete(distribution(multinomial) link(ologit)
> denominator(cons) basecategory(0) pql2) nopause

Error message: You must specify the file address for MLwiN.exe using either:
(1) the mlwinpath() option; for example mlwinpath(C:\Program Files\MLwiN v2.25\MLwiN.exe)
(2) a global called MLwiN_path; for example: . global MLwiN_path C:\Program Files\MLwiN v2.25\MLwiN.exe
We recommend (2) and that the user places this global macro command in profile.do, see help profile.

Can you please tell me what is going wrong now? Thank you again!

Re: Unhandled exception - optimat doesn't work

Posted: Tue Dec 10, 2013 2:43 pm
by mujaheedshaikh
Ok. Please ignore the previous message. I got around that. I am now able to run the null model, but when I add my independent variables it fails to run again. It now says "The model did not run properly in MLwiN. Re-run the model without the nopause option to debug the model in MLwiN." I run it without the nopause option but then it says "The model did not run properly in MLwiN. You most likely clicked the 'Abort Macro' button in MLwiN, rather than the 'Resume Macro' button." I did not click anything (honestly)..Please tell me what is wrong if anything now. Thank you again!

Re: Unhandled exception - optimat doesn't work

Posted: Tue Dec 10, 2013 3:27 pm
by ChrisCharlton
This may just be because it still isn't able to allocate the necessary amount of memory. I would suggest testing a subset of the data with both the 32bit an 64bit versions to check this works, and if it does increase the sample in steps.

Re: Unhandled exception - optimat doesn't work

Posted: Tue May 10, 2016 7:37 am
by antoniosarco