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
How to interpret PCA outcome variables?Hi all, I have a question with regards to principal component analysis. On the basis of pca, I crea…
Reshape long then wide: use variable labels as new variable's (j) values, and with missing valuesHi All, I'm trying to reshape a dataset, and I'm having two problems that I can't solve. What I'm …
Conditioning on wide variablesHello, I created a wide dataset where 'm201509' to 'm201512' are binary variables indicating that t…
Adding too many variables to a regression modelAm I correct in thinking adding too many variables to a regression model can increase the likelihood…
too many variables, tabulateHi there, I have some troubles with the command tabulate. My Goal is to create a table in Stata, ju…
Subscribe to:
Post Comments (Atom)
0 Response to import multiple .csv into Stata
Post a Comment