Line for the server...
If you are conditioning on dummies, the "==1" part is probably unnecessary:
***********
sysuse auto, clear
g byte hiweight=weight>3200
eststo clear
qui foreach dummy in foreign hiweight{
reg w p r if `dummy'
eststo
}
esttab
***********
HTH
Martin
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Ana R. Rios
Sent: Friday, January 09, 2009 6:13 AM
To: [email protected]
Subject: st: Loop & estout
Fellow Stata users,
I am using a loop to run regressions over different groups. Is it possible
to use estout to create a table from the stored estimates? I would
appreciate any advise/help.
Here is my code:
foreach XXX in urbano rural female male {
reg loginhr aedu edad edad2 exper if `XXX'==1 & muestraok==1[aweight=weight]
reg loginhr niv1p-niv6p edad edad2 exper if `XXX'==1 & muestraok==1
[aweight=weight]
xi: reg loginhr i.aedu edad edad2 exper if `XXX'==1 & muestraok==1
[aweight=weight]
}
Thank you for your time.
Regards,
Ana Rios
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/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/statalist/faq
* http://www.ats.ucla.edu/stat/stata/