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: RE: R: the egen command
From
"PAPANIKOLAOU P." <[email protected]>
To
<[email protected]>
Subject
st: RE: R: the egen command
Date
Fri, 22 Nov 2013 16:46:31 -0000
Dear Carlo,
Thank you very much for your creative feedback. It is most kind of you.
Best wishes
Panos
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Carlo Lazzaro
Sent: 22 November 2013 16:33
To: [email protected]
Cc: PAPANIKOLAOU P.
Subject: st: R: the egen command
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/
*
* 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/