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
Generating KM curves in stratified analysis with time varying covariateI am trying to generate KM curves in a survival analysis that is stratified by matched pairs and als…
Understanding interactions using -clogit_I have a 1:4 matched dataset. One case (a brain tumor that responded to an experimental treatment) m…
ESTIMATE Workshop at Michigan State in early JuneHi All: I'm not sure about the proper protocol when advertising workshops on Statalist. I suspect s…
removing 95%CI and renaming axis by intervalsHere is my code for prevalence vs month: logit mrsp i.month margins month, plot(ytitle(Prevalence) …
Out of sample tests with conditional logistic regressionHi all, This might be really simple question about out of sample tests, but still I couldn't find a…
Subscribe to:
Post Comments (Atom)
0 Response to Looping through Stata datasets applying the same processing code
Post a Comment