Can anyone think a way in which I can run a loop through values and through files?
My case:
I have quarterly surveys in a folder.
I need to create a birth cohort variable in each survey as: year-age.
The main problems are two:
1. I can not come up with a way in which in each file a different 'year' is used (i.e in 2007 survey 'year' should be 2007 in 2008 survey 'year' should be 2008)
2. Even having a way to do that, I need a way in which in all the four quarters of the same year the variable 'year' does not change.
I do not have a variable in the survey which indicates the year in which it was conducted (which simplifies considerably the problem)
Thanks in advance
My case:
I have quarterly surveys in a folder.
I need to create a birth cohort variable in each survey as: year-age.
The main problems are two:
1. I can not come up with a way in which in each file a different 'year' is used (i.e in 2007 survey 'year' should be 2007 in 2008 survey 'year' should be 2008)
2. Even having a way to do that, I need a way in which in all the four quarters of the same year the variable 'year' does not change.
I do not have a variable in the survey which indicates the year in which it was conducted (which simplifies considerably the problem)
Thanks in advance
Comment