Statalist


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

st: AW: sum of many variables


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: AW: sum of many variables
Date   Mon, 26 Oct 2009 19:45:00 +0100

<> 



*************
egen x=rowtotal(x1-xn)
*************



HTH
Martin

-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Andrea Rispoli
Gesendet: Montag, 26. Oktober 2009 19:46
An: [email protected]
Betreff: st: sum of many variables

Dear Statalisters,

I would like to use the sum command, i.e.

egen x= sum (x1, x2...xn)

however since my n is a large number I would like to indicate that I
want the sum from x1 to xn without specifying all variables.

Do you have any suggestions?

Thank you very much in advance

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