foreach x in BE DE ES FR GB US {
foreach y in BE DE ES FR GB US {
if "`x'"!="`y'" {
xi: probit d`x' ls`y' i.d10_comp
outreg2 using "D:\UsersData\Estrella\results\probit_`x'-`y'.xls", bdec(4) se replace
}
}
}
On 4/17/2013 10:47 AM, Estrella Gomez wrote:
Hi,
I am trying to run 36 probits using this loop:
foreach x in BE DE ES FR GB US {
foreach y in BE DE ES FR GB US {
xi: probit d`x' ls`y' i.d10_comp
outreg2 using "D:\UsersData\Estrella\results\probit_`x'-`y'.xls",
bdec(4) se replace
}
}
However, in those cases in which x and y coincides (for instance, xi:
probit dBE lsBE i.d10_comp), I obtain the error message "no
observations".
How could I write this loop for excluding those cases?
Thank you very much,
Estrella
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/