Hello!
I have 12 files from years from 2006 to 2017 and I have one code that I want to run in all of them. I thought the following works:
foreach n in seq(), from=2006 to=2017 {
display "'n'"
use "C:\Users\Admin\Documents\'n'.dta"
*main code
}
But it doesn't work. I am a beginner in STATA, please, could you say how to do it in a proper way?
Thank you in advance for your help!
Related Posts with Manipulating with many files
Creating a new variable based on all the following values of an existing variableHello -- I was unsure how to word the title, but hopefully it offers some clue as to what I am tryin…
set string case to missing if a phrase is foundHello, I have a series of string variables (drug1 - drug25) that contain information on types of dr…
How to calculate distance in this case?Dear all, I would like to calculate a distance as follows: distance is defined as the straight-line…
about mixed command and the random effectsDear professors When I type the command "mixed education culture ses100 $var || schids: culture, …
How to correctly interrupt the moderating effect in a modelDear all I have three variables: New.gw is my x and log_spread is my Y and the moderator is a legal …
Subscribe to:
Post Comments (Atom)
0 Response to Manipulating with many files
Post a Comment