[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: capture number of -xtmixed- iterations?

From (Yulia Marchenko, StataCorp)
Subject   Re: st: capture number of -xtmixed- iterations?
Date   Wed, 26 Dec 2007 16:03:44 -0600

I'd like to add two small corrections below to my previous posting:

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
	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)

simulate (e:conv = e(converged)) _b, reps(3): mywrapper
qui summ  e_conv
di as txt "# converged: " as res r(N)


*   For searches and help try:

© Copyright 1996–2022 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index