Hello everyone,
I nee to use some stata commands inside a mata loop and it seems not to work.
For example if I run:
the code executes without problems. But if I use a loop with the same expretions:
the code executes seemingly without problems too and does not show any error code.
But it does not wait for even one second.
Do I miss something or is there an other way to use stata() inside a mata loop?
I nee to use some stata commands inside a mata loop and it seems not to work.
For example if I run:
Code:
clear mata mata k=2 stata("timer on 1") stata("sleep " + strofreal(k) + "000") stata("timer off 1") stata("timer list 1") stata("timer clear") end
Code:
clear mata mata for (k=1; 5<=k; k++) { stata("timer on 1") stata("sleep " + strofreal(k) + "000") stata("timer off 1") stata("timer list 1") stata("timer clear") } end
But it does not wait for even one second.
Do I miss something or is there an other way to use stata() inside a mata loop?
Comment