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
xtreg, fe robust: xtoverid error(2b) operator invalid when correcting Hausman test (V_b-V_B is not positive definite) due to year dummiesDear Statalisters, I am analyzing a panel dataset with year dummies over a period of 2000-2018 and …
Comparing two waves with RE-LogitI am currently using Panel data from the SOEP to analyze and compare political interest in 2013 and …
Doubt on Heckprob model resultsHello everybody, I'm running a Heckman selection model based on a heckprob. I have some categorical…
Help creating graph for multiple linear regressionDear all, I am using Stata 16, on mac. I am estimating the regression: reg GDP agedpop population …
Medeff command: invalid mediate (error r(198))Dear Statalists, Could you please tell me the reason why when I type the following command: medeff…
Subscribe to:
Post Comments (Atom)
0 Response to Manipulating with many files
Post a Comment