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
Prepare data in order to create value weighted returns.Dear all, I am currently working on my last steps in my master thesis. I calculated buy and hold- an…
How to find ttest at 1% ?Hello. I want to make a t-test at 5%and one at 1%. I use this code : Code: ttest d2, by(b7a) The…
How can I run an event study on this dataset?Hi, I want to look at market reaction in response to earnings announcements, and I have a dataset i…
prepare date in order to create value weighted returnsDear all, I am currently working on my last steps in my master thesis. I calculated buy and hold- an…
Testing b coefficients Panel modelsI'm running 9 different Panel model to test diaspora effects of migration on trade for 9 different c…
Subscribe to:
Post Comments (Atom)
0 Response to Looping through Stata datasets applying the same processing code
Post a Comment