I am finding in Stata that there does not seem to be an easy way to
increment a counter despite countless trys and readings of the manal.
I want to do something llike the following, this is just an example:
generate byte total_sum =0
for each variable of varlist {
if age > 50
total_sum = total_sum + age
}
Stata doesn't seem to allow the if... then construct unless it is in a
program. Although I have written a simple program (crazy that I have to do
this) passing arguments, I still can't get it to work.