Dear fellow Stata users,
I am trying to apply same commands to different datasets. I am currently working on 4 quarterly datasets. Using
Code:
cd "yourfolder" local files: dir . files "*dta" foreach file of local files { use "`file'", clear //do something }
However, when I press saving after this, STATA only saves results from the last quarter. But, I can see by looking at deleted observations, real changes etc that commands apply to all 4 quarters but I am not sure how to save it all. What should I add to my command?
I am trying to apply same commands to different datasets. I am currently working on 4 quarterly datasets. Using
Code:
cd "yourfolder" local files: dir . files "*dta" foreach file of local files { use "`file'", clear //do something }
However, when I press saving after this, STATA only saves results from the last quarter. But, I can see by looking at deleted observations, real changes etc that commands apply to all 4 quarters but I am not sure how to save it all. What should I add to my command?
Comment