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
Multi level modelling cross level analysisI want to examine the effect of education(xvar) on prejudice(yvar) (both 1. level variables) moderat…
Merging Datasets -- Variable Responses DeletedHi all, I am merging a number of different datasets and am having trouble with the merge command "d…
Estimating the significance of fixed effects with clustered standard errorsHi all, I am estimating the following equation. Code: xtreg lemp lunion lunemployment lfertilit…
Calculating adjusted proportionsThere are examples of analyses using Stata (14) that calculates proportion of one variable by adjust…
Covariance matrix of residuals in VAR modelI am estimating a VAR model in STATA. The model is as follows: Code: var potgap defl interest, no…
Subscribe to:
Post Comments (Atom)
0 Response to Manipulating with many files
Post a Comment