Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: tabout loop across surveys


From   "Cardozo-Silva, Adriana-Rocio" <[email protected]>
To   <[email protected]>
Subject   st: tabout loop across surveys
Date   Thu, 1 Aug 2013 19:19:52 +0200

Hello,
I am using tabout to export a table containing average wages by industry
sectors using 9 different survey years.
 (from 2002 to 2010). When I use the append command, the resulting table
shows a table for each year ordered vertically. 
I want to have a table containing the industry sectors in the first column
and to its right the average wages for each year.
Can some one tell me how to do such a loop?

My code is:

foreach year in 02 03 04 05 06 07 08 09 10{
use cos`year', clear
tabout industry [weight=weight] using result.cvs, c(mean wages) sum
h2(Average Wages) h3(Year 20`year')  format(1) append
}



Thanks

*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index