Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: Loop & estout


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: RE: Loop & estout
Date   Fri, 9 Jan 2009 09:25:38 +0100

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/



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