Hello,
I have a large dataset that I have split into 10 chunks, I have written some code to loop through each Stata table applying the same processing code. However, when I highlight the script on the.do file, the code is printed on the Stata screen - but nothing happens - no errors, but the .dta files are not read into Stata as I would expect.
The beginning of the .do file is like this:
cd "X:xxxxxx\xxxxxx\xx"
local files: dir "." files "q10*.dta"
foreach files of local files {
Processing script e.g. merge and drop, creation of new variables
save `file', replace
}
I am at a loss as to what I am doing wrong.
Related Posts with Looping through Stata datasets applying the same processing code
Race and age composition for 50 states in multiple yearsI'm working with ACS data where I'm gonna need state controls like - income per capita , unemploymen…
Heckman Selection model failing to convergeSorry if this is long, but I think the context is needed. I have a regression for estimating likeli…
OLS R^2 for large datasets inaccurate (lassogof)Dear community, I am using 'lassogof' to compare the performance of different Lasso, Elastic Net an…
Match different ID variablesHello, I cannot find a solution for this by myself: I have panel data, several waves with unique IDs…
Interpreting turning poingHello, I have calculated the turning points of my models, but in one of them i first differenced som…
Subscribe to:
Post Comments (Atom)
0 Response to Looping through Stata datasets applying the same processing code
Post a Comment