Saving residuals chains

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
francescomolteni
Posts: 7
Joined: Mon Oct 19, 2015 3:11 pm

Saving residuals chains

Post by francescomolteni »

dear all,
I am running a cross classified model and I am having troubles saving the MCMC chains for residuals.
I attach here a simplified version of the code I am using:

Code: Select all

global MLwiN_path "C:\Program Files (x86)\MLwiN v2.35\x64\mlnscript.exe"
gen cons=1

runmlwin attendp cons, ///
	level2(cohort: cons) ///
	level1(id_individual: cons) ///
	nopause forces mlwinsettings(optimat)
	
runmlwin attendp cons, ///
	level2(cohort: cons, residuals(u,savechains("u.dta",replace))) ///
	level1(id_individual: cons) ///
	mcmc(on cc  savechains("chain.dta", replace)) initsprevious nopause forces mlwinsettings(optimat) 

While it correctly saves the chains for the parameters, it does not save any file (it should be u.dta) with the chains for residuals.

Any idea?

thank you for your patience!
Francesco
ChrisCharlton
Posts: 1353
Joined: Mon Oct 19, 2009 10:34 am

Re: Saving residuals chains

Post by ChrisCharlton »

Could you please confirm whether this also happens with the development version of runmlwin (available from https://bitbucket.org/cmm_stata/runmlwin/src/master/)? To test this you need to replace your version of runmlwin.ado with the version on the linked page. You can find where this is installed on your machine with the Stata command:

Code: Select all

. which runmlwin
If this is the case can you add the viewfullmacro option to your command and post the generated script.

I also notice that you are running a fairly old version of MLwiN, so would suggest updating to the most recent version. You can obtain this by completing the following form: https://www.cmm.bristol.ac.uk/clients/softwaredownload/.
francescomolteni
Posts: 7
Joined: Mon Oct 19, 2015 3:11 pm

Re: Saving residuals chains

Post by francescomolteni »

dear Chris, I have replaced my runmlwin ado with the one you suggested and everything works fine now,
thank you so much, very appreciated!
Post Reply