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: the egen command


From   "PAPANIKOLAOU P." <[email protected]>
To   <[email protected]>
Subject   st: the egen command
Date   Fri, 22 Nov 2013 16:08:53 -0000

Dear All,
I tried to use the commands: egen, sum on each occasion, but with no success. 
How best could I get the sum of the variables i.e., X1+X2+...+Xn.
I would appreciate your feedback.

. egen ENG2006_11= sum(EN_WAL_births_2006, EN_WAL_births_2011, EN_WAL_births_2010, EN_WAL_births_2009, EN_WAL_births_2008, EN_WAL_births_2007)  --  r(198);

. gen ENG2006_11= sum(EN_WAL_births_2006 EN_WAL_births_2011 EN_WAL_births_2010 EN_WAL_births_2009 EN_WAL_births_2008 EN_WAL_births_2007) --  r(198);

Kind regards
Panos


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