Page 1 of 1

Saving residuals chains

Posted: Thu Jun 06, 2019 9:58 am
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

Re: Saving residuals chains

Posted: Fri Jun 07, 2019 10:53 am
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/.

Re: Saving residuals chains

Posted: Mon Jun 10, 2019 12:39 pm
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!