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
Panel data with lagged independent variables and dependent variable only two periodsHi Member, Please, does anyone could help me? I need to lag and lead one independent variable in my …
How to create bottom 26% of the populationHi, I have been using thus far xtile quin=mpce[aw=weight], n(5) to create bottom 20% of the populat…
Unique frequency table from repeated category variablesHi !, I have three category variables (credit_provider_1,_2,_3) generated over the number of "loans"…
qregsel implementationDear members Am implementing the recommendations in this paper https://www.stata.com/meeting/us20/s.…
Firm, industry and event fixed effects in a regression modelI am doing an event study on the impact of ESG on stock returns. I have performed the event study it…
Subscribe to:
Post Comments (Atom)
0 Response to Looping through Stata datasets applying the same processing code
Post a Comment