Dear Statalisters
I have 25 variables all named event_eventtype , where event type may differ.
I then have an additional 25 variables named event_eventtype180, event type can be both_sides or oneside - the naming seems a bit random.
I then have an additional 25 variables named event_eventtype365
all variables are integer 0,1,2,3,4…_N
i want to generate a new variable that is the sum of all 25 event_eventtype variables
and one that is the sum of all event_eventtype180
and one that is the sum of all event_eventtype365
the slow and space filling way is to copy all variable names of interest into the do editor and enter + between the variables, but i imagine there is a better solution to my problem.
Hope this makes sens
thank you
lars
I have 25 variables all named event_eventtype , where event type may differ.
I then have an additional 25 variables named event_eventtype180, event type can be both_sides or oneside - the naming seems a bit random.
I then have an additional 25 variables named event_eventtype365
all variables are integer 0,1,2,3,4…_N
i want to generate a new variable that is the sum of all 25 event_eventtype variables
and one that is the sum of all event_eventtype180
and one that is the sum of all event_eventtype365
the slow and space filling way is to copy all variable names of interest into the do editor and enter + between the variables, but i imagine there is a better solution to my problem.
Hope this makes sens
thank you
lars

Comment