I have 20 .csv files which are 2001.csv 2002.csv...... 2020.csv, and I intend to import them into Stata. The following is the command:
forvalues i=2001/2020 {
clear
import delimited 'i'.csv
save 'i'.dta,replace
}
But the command window shows that "i" is invalid. I don't know what the problem is, andI need your advice urgently. Thank you!
Related Posts with import multiple .csv into Stata
Correct to take log of explanatory variable already in percentages?Is it correct to take logs of a variable, e.g. tax revenue, already measured in percentage form? e.…
Comparing models in Latent Class analysisI have stored the estimates for a 2-class, 3-class, 4-class and 5-class model. Now I would like to c…
Endogenous control variables in nonlinear regressionDear Statlisters, I am sorry in advance for the length of this question, I found that a little conte…
Analyze an increase in minimu wages on stataHi all, I'm very new to Stata and I'm doing my own research for a class to write a paper. I'm trying…
If statement with stringDear everyone, I hope you are doing well. I exported a document from Excel into Stata. One of the c…
Subscribe to:
Post Comments (Atom)
0 Response to import multiple .csv into Stata
Post a Comment