Dear Statalist Users,
I have multiple txt files and I want to convert them into stata files so that I can append the data.
This is the manual way of importing the data and then saving it for stata.
import delimited "C:\Dir\Manu - 00-01.txt", delimiter("|") varnames(2)
rename v1 company
rename v2 product
save manu_00-01
However, I have 20 text files in the form of Manu - 00-01.txt, Manu - 00-02.txt, Manu - 00-03.txt and so on till Manu - 18-19.txt.
I seek you suggestion on writing a loop for the same so that I can append it accordingly
Thank you
Related Posts with Writing a Loop
Hypothesis testing between regression coefficientsHi everyone! So I created this regression table using the following commands Code: areg logincome l…
How to get R-squared in GMM regressions?Hello everyone, I am estimating Taylor rules of monetary policy using GMM and "gmm" command (Stata 1…
Regressions by industry - quarterDear users, I hope that you may help me with the following issue. I'm running regressions by indust…
reghdfe produce coefficients with opposite signI have problem with re-producing results using the same data using reghdfe command. The version of …
Wild cluster boostrap t- CGD(2008)Hi, I am asked to write Stata command reproduce the results of Wild Cluster Boostrap T as in " Came…
Subscribe to:
Post Comments (Atom)
0 Response to Writing a Loop
Post a Comment