MLwiN does not respond with Stata 14
-
- Posts: 7
- Joined: Fri Jan 06, 2017 4:20 pm
MLwiN does not respond with Stata 14
Hi forum! I recently picked up the 30 days trial version of MLwiN for my dissertation project and I consider purchasing the full license. However, so far I have not been able to make MLwiN to run with Stata 14. I have followed the tutorial (http://www.stata.com/meeting/uk11/abstr ... leckie.pdf) and used the tutorial data set and successfully created a global mlwin_path.
When I, in Stata, execute:
. runmlwin normexam cons, level2(school: cons) level1(student: cons)
MLwiN does not open and Stata gives me the error "The model did not run properly in MLwiN. You most likely clicked the 'Abort Macro' button in MLwiN, rather than the 'Resume Macro' button." The same result occurs if MLwiN already is running when I execute the command in Stata.
What do I do wrong?
Kind regards,
David
When I, in Stata, execute:
. runmlwin normexam cons, level2(school: cons) level1(student: cons)
MLwiN does not open and Stata gives me the error "The model did not run properly in MLwiN. You most likely clicked the 'Abort Macro' button in MLwiN, rather than the 'Resume Macro' button." The same result occurs if MLwiN already is running when I execute the command in Stata.
What do I do wrong?
Kind regards,
David
-
- Posts: 1384
- Joined: Mon Oct 19, 2009 10:34 am
Re: MLwiN does not respond with Stata 14
Could you try running the following command to check that the MLwiN_path global has been set correctly:
When you run this MLwiN should start, if not then it would be worth checking that the value you set the global to refers to the location of MLwiN on your machine, as it is likely to be different to the one in the tutorial you refer to.
Code: Select all
shell $MLwiN_path
-
- Posts: 7
- Joined: Fri Jan 06, 2017 4:20 pm
Re: MLwiN does not respond with Stata 14
Thanks for the reply Chris! If I run shell $MLwiN_path MlwiN responds, so I guess the problem isn't related to the global...
Just to clarify, is it correct that I do not have to do anything in MlwiN prior to the runmlwin command in Stata?

-
- Posts: 1384
- Joined: Mon Oct 19, 2009 10:34 am
Re: MLwiN does not respond with Stata 14
Yes, that is correct, it should just be a matter of telling -runmlwin- where MLwiN has been installed. It's possible that because MLwiN has been wrapped up to make it a trial version that the command line options are not being passed on correctly, however if that was the case I would have expected that at least the application would have started up. Could you try running the Stata command:
and posting the output from Stata, in particular from just before the error message is displayed?
Code: Select all
set trace on
-
- Posts: 7
- Joined: Fri Jan 06, 2017 4:20 pm
Re: MLwiN does not respond with Stata 14
------------------------------------------------------------------------------------------------------------------------ end runmlwin_qshell ---
- else {
quietly runmlwin_qshell "`mlwinpath'" /nogui /run `filemacro3'
display as text " --- Begin MLwiN error log --- "
type `errlog'
display as text " --- End MLwiN error log --- " _n
}
- }
- if "`fit'" == "nofit" {
= if "" == "nofit" {
di as txt "The savewinbugs nofit option caused runmlwin to end prematurely."
ereturn scalar mcmcnofit = 1
exit
}
- capture use "`fileresults'", clear
= capture use "C:\Users\davek724\AppData\Local\Temp\ST_01000005.tmp", clear
- if _rc {
- if ("`pause'"=="") display as error "The model did not run properly in MLwiN. You most likely clicked the 'Abort Macro' button in MLwiN, rather
> than the 'Resume Macro' button." _n
= if (""=="") display as error "The model did not run properly in MLwiN. You most likely clicked the 'Abort Macro' button in MLwiN, rather than th
> e 'Resume Macro' button." _n
The model did not run properly in MLwiN. You most likely clicked the 'Abort Macro' button in MLwiN, rather than the 'Resume Macro' button.
- if ("`pause'"=="nopause") display as error "The model did not run properly in MLwiN. Re-run the model without the nopause option to debug the mo
> del in MLwiN." _n
= if (""=="nopause") display as error "The model did not run properly in MLwiN. Re-run the model without the nopause option to debug the model in
> MLwiN." _n
- exit 198
}
----------------------------------------------------------------------------------------------------------------------- end runmlwin.Estimates ---
Let me know if you need more of the Stata output. Thank you once more!
- else {
quietly runmlwin_qshell "`mlwinpath'" /nogui /run `filemacro3'
display as text " --- Begin MLwiN error log --- "
type `errlog'
display as text " --- End MLwiN error log --- " _n
}
- }
- if "`fit'" == "nofit" {
= if "" == "nofit" {
di as txt "The savewinbugs nofit option caused runmlwin to end prematurely."
ereturn scalar mcmcnofit = 1
exit
}
- capture use "`fileresults'", clear
= capture use "C:\Users\davek724\AppData\Local\Temp\ST_01000005.tmp", clear
- if _rc {
- if ("`pause'"=="") display as error "The model did not run properly in MLwiN. You most likely clicked the 'Abort Macro' button in MLwiN, rather
> than the 'Resume Macro' button." _n
= if (""=="") display as error "The model did not run properly in MLwiN. You most likely clicked the 'Abort Macro' button in MLwiN, rather than th
> e 'Resume Macro' button." _n
The model did not run properly in MLwiN. You most likely clicked the 'Abort Macro' button in MLwiN, rather than the 'Resume Macro' button.
- if ("`pause'"=="nopause") display as error "The model did not run properly in MLwiN. Re-run the model without the nopause option to debug the mo
> del in MLwiN." _n
= if (""=="nopause") display as error "The model did not run properly in MLwiN. Re-run the model without the nopause option to debug the model in
> MLwiN." _n
- exit 198
}
----------------------------------------------------------------------------------------------------------------------- end runmlwin.Estimates ---
Let me know if you need more of the Stata output. Thank you once more!
-
- Posts: 1384
- Joined: Mon Oct 19, 2009 10:34 am
Re: MLwiN does not respond with Stata 14
Could you try the following command:
and report any messages as this may help determine whether the problem is with our shell plugin? This should, like the -shell- command before, start up MLwiN.
Code: Select all
runmlwin_qshell $MLwiN_path
-
- Posts: 7
- Joined: Fri Jan 06, 2017 4:20 pm
Re: MLwiN does not respond with Stata 14
. runmlwin_qshell $MLwiN_path
-------------------------------------------------------------------------------------------------------------------------- begin runmlwin_qshell ---
- version 9.0
- syntax [anything(equalok everything)] [, *]
- if `"`anything'"' == "" {
= if `"C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Centre for MultiLevel Modelling\MLwiN 2.36 (32-bit).lnk"' == "" {
capture plugin call runmlwin_quietshell, `"cmd"'
if c(rc) == 199 {
shell `cmd'
}
}
- else {
- capture plugin call runmlwin_quietshell, `"`anything'"'
= capture plugin call runmlwin_quietshell, `"C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Centre for MultiLevel Modelling\MLwiN 2.36 (32-bit
> ).lnk"'
- if c(rc) == 199 {
shell `anything'
}
- }
---------------------------------------------------------------------------------------------------------------------------- end runmlwin_qshell -
This did not start up MLwiN, however.
-------------------------------------------------------------------------------------------------------------------------- begin runmlwin_qshell ---
- version 9.0
- syntax [anything(equalok everything)] [, *]
- if `"`anything'"' == "" {
= if `"C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Centre for MultiLevel Modelling\MLwiN 2.36 (32-bit).lnk"' == "" {
capture plugin call runmlwin_quietshell, `"cmd"'
if c(rc) == 199 {
shell `cmd'
}
}
- else {
- capture plugin call runmlwin_quietshell, `"`anything'"'
= capture plugin call runmlwin_quietshell, `"C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Centre for MultiLevel Modelling\MLwiN 2.36 (32-bit
> ).lnk"'
- if c(rc) == 199 {
shell `anything'
}
- }
---------------------------------------------------------------------------------------------------------------------------- end runmlwin_qshell -
This did not start up MLwiN, however.
-
- Posts: 1384
- Joined: Mon Oct 19, 2009 10:34 am
Re: MLwiN does not respond with Stata 14
Could you try changing your global from the shortcut location:
to the location of the executable, which will be something like:
Code: Select all
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Centre for MultiLevel Modelling\MLwiN 2.36 (32-bit).lnk
Code: Select all
C:\Program Files (x86)\MLwiN trial\i386\mlwin.exe
-
- Posts: 7
- Joined: Fri Jan 06, 2017 4:20 pm
Re: MLwiN does not respond with Stata 14
That did solve the issue! Awesome, thank you!
Kind regards,
David
Kind regards,
David