Problem with savechains(filename , replace)

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
RachaelHughes
Posts: 9
Joined: Thu Jun 13, 2019 10:33 am

Problem with savechains(filename , replace)

Post by RachaelHughes »

I hope you can help me with the following problem.

Using the Stata version of runmlwin, I am fitting a 2-level model using
mcmc where I would like to save the chains of the parameter estimates. My
runmlwin code is

runmlwin pdiff_px constant, ///
level2(surgeonid: constant) ///
level1(level1id: constant) ///
nopause initsprevious ///
mcmc(on savechains(chain_pdiffpx_SE, replace))

The model is estimated but then it crashes just before it can return the results
to the screen. The error is "file chain_pdiffpx_SE.dta not found
r(601);". The same error occurs if I omit the suboption replace.

I am using Stata version 15.1, *! runmlwin.ado, George Leckie and Chris
Charlton, 09Feb2018.

Thank you for your time.
ChrisCharlton
Posts: 1353
Joined: Mon Oct 19, 2009 10:34 am

Re: Problem with savechains(filename , replace)

Post by ChrisCharlton »

Before we start to look into this too closely could you please try your model with the development version of runmlwin.ado (available from https://bitbucket.org/cmm_stata/runmlwin/src/master/) and let us know whether the same problem occurs there?
ChrisCharlton
Posts: 1353
Joined: Mon Oct 19, 2009 10:34 am

Re: Problem with savechains(filename , replace)

Post by ChrisCharlton »

One other thing to check is whether adding the ".dta" file extension to the end of specified file name fixes this for you.
RachaelHughes
Posts: 9
Joined: Thu Jun 13, 2019 10:33 am

Re: Problem with savechains(filename , replace)

Post by RachaelHughes »

Hi Chris,

Using the development version of runmlwin.ado made no difference. Adding extension .dta solved the problem.

Thanks
Rach
ChrisCharlton
Posts: 1353
Joined: Mon Oct 19, 2009 10:34 am

Re: Problem with savechains(filename , replace)

Post by ChrisCharlton »

Thanks for the confirmation. I have now updated the development version so that if no file extension is specified it will add ".dta" to the name that the user specified.
Post Reply