egen citotaleverything = rowtotal(citotal*)
Nick
[email protected]
Ekaterina Hertog
I have a set of variables which denote population by age group in a
location a given individual lives in my dataset and I want to add them
up to total population in a location where each individual lives.
The names of the variables I have look as follows:
citotal1519 (meaning total population of 15 to 19 year olds in the city)
citotal2024 (meaning total population of 20 to 24 year olds in the city)
citotal2529 (meaning total population of 25 to 29 year olds in the city)
...
citotal7074 (meaning total population of 70 to 74 year olds in the city)
I was wondering if it might be possible to somehow ask Stata to add all
the variables which start with citotal?
*
* 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/