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: R: the egen command
From
"Carlo Lazzaro" <[email protected]>
To
<[email protected]>
Subject
st: R: the egen command
Date
Fri, 22 Nov 2013 17:33:19 +0100
Dear Panos,
if you are interested in the row sum of your variables, your code should be:
egen ENG2006_11= rowtotal(EN_WAL_births_2006, EN_WAL_births_2011,
EN_WAL_births_2010, EN_WAL_births_2009, EN_WAL_births_2008,
EN_WAL_births_2007)
For further details on this handy command - help egen - is the right place
to start.
Best regards,
Carlo
-----Messaggio originale-----
Da: [email protected]
[mailto:[email protected]] Per conto di PAPANIKOLAOU P.
Inviato: venerdì 22 novembre 2013 17:09
A: [email protected]
Oggetto: st: the egen command
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/
*
* 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/