What is wrong with commands in this Stata do-file? I am trying to open all batch files that are in separate sub-folders named Batch1-Batch2-..... to Batch32. These subfolders are in Output folder.
Also is there any way to append them using loops in Stata rather than doing one by one?
clear all
gl outputs "E:\Outputs"
forvalues i = 1/32 {
import delimited "$outputs/Batch`i'/batchfile.tab", clear
tempfile batchfile_`i'
save `batchfile_`i''
}
Related Posts with Loops to switch between different sub-folders
IV regression issuesI have the following school level data with MSA indicators metaread, and other controls. Here is a s…
Help Granger Causality testHi gyus! I would like to perform a Granger causality test after a VECM. Does anyone have an idea? S…
Adjust tests for size in MataHi Stata/Mata users, I have the following issue. I have to adjust t-tests for size so that their tr…
Bysort with generation of variableI am trying to calculate the daily mean of a variable contingent on various conditions. For example,…
Merging two datasets based on first and last namesHi! I'm working on an analysis of student performance. I have 2 lists- list A contains the names of …
Subscribe to:
Post Comments (Atom)
0 Response to Loops to switch between different sub-folders
Post a Comment