I have two files, each with 3 variables.
The first one has date, city, and score. The second one has date, city and ret. Each has 49 cities.
I want to split each files to 49 stata files, by city.
Then merge the 49 score files with the 49 ret files by city and date.
Then merge each of the 49 files with a fulldate file (only one variable date with all the 365/366 dates per year).
merge 1:1 date using fulldate
Then for the 49 files, each
replace city="cityname" if missing(city)
Then append all the 49 files to one file.
Anyone can help?
Great thanks!
Related Posts with Split to multiple files, merge and append
Multinomial Logistic Regression Taking hour+Hello, I'm running a fairly simple multinomial logistic regression with a sort of categorical/ordina…
Comparing different cohorts amongst different yearsHello I had a question regarding comparison tests. Currently I'm working on comparing 3 cohorts (pre…
Graphing: Scatter PlotDear Stata, I have a panel data. I want to graph a scatter plot, y axis is wage in log form, and x a…
Robust correlation matrix/ covariance matrixHi Statalist members I would like to ask: How to obtain a robust correlation/ covariance matrix? S…
Why stata still reports log likelihood results for Linear Probability Model when use esttab?Dear statalists, when I report both LPM and logistic regression results use esttab function, why Sta…
Subscribe to:
Post Comments (Atom)
0 Response to Split to multiple files, merge and append
Post a Comment