Hi,
I am using Stata 13.1.
I have a bunch of data sets (all located in the same folder) saved as .csv. Each data set represents data from a different year (but there is no variable in each data set identifying the year it is from). I want to merge the data sets so I can study the trends from year to year. I need to add a variable "year" to each data set so I can correctly identify the data once the files are merged.
The tedious way of doing this is to add the variable to each data set, save it to a .dta and then merge the files.
Is there a faster way to do this?
Thanks for the help.
I am using Stata 13.1.
I have a bunch of data sets (all located in the same folder) saved as .csv. Each data set represents data from a different year (but there is no variable in each data set identifying the year it is from). I want to merge the data sets so I can study the trends from year to year. I need to add a variable "year" to each data set so I can correctly identify the data once the files are merged.
The tedious way of doing this is to add the variable to each data set, save it to a .dta and then merge the files.
Is there a faster way to do this?
Thanks for the help.
Comment