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

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

From   Jeph Herrin <[email protected]>
To   [email protected]
Subject   Re: st: capture number of -xtmixed- iterations?
Date   Wed, 26 Dec 2007 20:25:37 -0500

Nice tip. Thanks.


Yulia Marchenko, StataCorp wrote:
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)

[email protected]

*   For searches and help try:

*   For searches and help try:

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