Page 1 of 1

Problem with savechains(filename , replace)

Posted: Thu Jun 13, 2019 4:49 pm
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.

Re: Problem with savechains(filename , replace)

Posted: Fri Jun 14, 2019 8:50 am
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?

Re: Problem with savechains(filename , replace)

Posted: Fri Jun 14, 2019 11:37 am
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.

Re: Problem with savechains(filename , replace)

Posted: Tue Jun 18, 2019 1:54 pm
by RachaelHughes
Hi Chris,

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

Thanks
Rach

Re: Problem with savechains(filename , replace)

Posted: Tue Jun 18, 2019 1:56 pm
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.