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
Using matrix as lookup tableHello, I have two datasets. I am trying to get a new variable in the second dataset, which looks up…
Interpreting quadratic terms in a multiple linear regression.Hi everyone on Statalist, I am working on a project and have run into a few obstacles. The purpose…
Generate sequencial dicotomic variableHi all, I am trying to alternate position label (pos=6 and pos=12) in a scatter graph, for this pur…
Graphing three-way interactionHi Statalist, In one of my models I include a three way interaction between two dichotomous variabl…
GLLAMM error not convergeHi all, I have date of 100 employees per company, for several companies. I would like to perform a …
Subscribe to:
Post Comments (Atom)
0 Response to Manipulating with many files
Post a Comment