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]

[no subject]



I want to calculate the  row sum of all *_F variables pertaining to eu
countries (all excluding US_F):
egen eutotal=rowtotal(GE_F NL_F  UK_F)

However, I would prefer to follow some rules in selecting the variables, like

levels country if eu==1, local(lev)
egen eutotal=rsum(`lev'_F)

This doesn't work, however. Any pointers would be appreciated.

Joe.
*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index