Page 1 of 1

Error when running MLwiN MCMC Manual examples

Posted: Thu Jan 24, 2013 4:32 pm
by FloHarrison
Hi,

I'm trying to work out how to run multiple membership models through runmlwin, so am working through the examples in chapter 16 of the MLwiN MCMC Manual. Whenever I try and run something with the MCMC option on I get this error:

invalid expression
r(3000);

so

Code: Select all

runmlwin logearn cons age_40 numjobs, level2(company:) level1(id: cons) nopause
runs fine, but:

Code: Select all

runmlwin logearn cons age_40 numjobs, level2(company:) level1(id: cons) mcmc(on) initsprevious nopause
then generates the error.

Does anyone know why I'm getting this error, and what I can do about it? I'm using MLwiN2.26 and Stata/IC 11.0 for windows

Flo

Re: Error when running MLwiN MCMC Manual examples

Posted: Fri Jan 25, 2013 12:16 pm
by ChrisCharlton
Could you please firstly check that your version of runmlwin is up to date? If it is then could you type the following Stata command before running the model:

Code: Select all

set trace on
and then us know what the output is prior to the error message?

Re: Error when running MLwiN MCMC Manual examples

Posted: Fri Jan 25, 2013 4:19 pm
by ChrisCharlton
I've just remembered that I have come across this error before. Currently in runmlwin we have some version checking code which isn't correctly matched up (in one place it checks for 11.0 and another 11.1). You should be able to work around this by either updating your version of Stata to at least 11.1 (which you can do with the Help->Check for updates menu in Stata), or by editing the following lines in runmlwin.ado:

Code: Select all

if _caller() >= 11 {

to:

if _caller() >= 11.1 {

in the program define runmlwin_savechains section of runmlwin.ado.
This will be fixed in the next release of runmlwin.

Re: Error when running MLwiN MCMC Manual examples

Posted: Mon Jan 28, 2013 10:28 am
by FloHarrison
Hi Chris,

Thanks for your help - I went with the second option and it's all running fine now.

Flo