  | 
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: capture number of -xtmixed- iterations?
I'd like to add two small corrections below to my previous posting:
http://www.stata.com/statalist/archive/2007-12/msg00650.html
1) The number of iterations is not saved after -xtmixed- BUT is saved after
most -ml- commands in -e(ic)-.
2) Saving the convergence flag in return results is unnecessary, you can
simply use -e(converged)- as an expression in -simulate-:
/******************************************************/
cap program drop mywrapper
program mywrapper
	version 10
	clear
	set obs 10
	gen double id = _n
	gen double y = 2*invnormal(uniform())
	expand 5
	replace y = 5 + y + invnormal(uniform())
	xtmixed y || id: , iter(3)
end
simulate (e:conv = e(converged)) _b, reps(3): mywrapper
qui summ  e_conv
di as txt "# converged: " as res r(N)
/******************************************************/
--Yulia
[email protected]
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/