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
How to generate a local list with numbers in a simple wayHi all, I have a simple question. Say I want to process filenames or variable names with consecutive…
Interaction Term Graphs for Quadratic TermsHi All, I have the following regression equation. I am trying to see the interaction effect of a bi…
Finite Population specification for multi-level cross-classified models with repeated measuresHi all, I'm working with a three-level cross-classified model with repeated measures (i.e. multiple…
Generating quarterly date columnHi guys, A quick simple problem which is driving me nuts: I am trying to generate a quarterly time …
Matching with replacement based on size and industryHi, I am currently doing my thesis and I am struggling with this problem. I have a panel dataset i…
Subscribe to:
Post Comments (Atom)
0 Response to Manipulating with many files
Post a Comment