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
Syntax check for MLM with continuous dependent and independent variable and assessing for 2nd degree interaction 1) by time, and 2) by groupI am interested in doing: (1) MLM with a continuous dependent and independent variable, (2) Assessi…
Why is this -monthly("201901","YM")- not working, while this -date("20190101","YMD")- works perfectly fine?In my opinion this should be working: Code: . dis %tm monthly("201901", "YM") . but it is …
Graphing Coefficients by Year-Hi All, A snippet of my data resembles the following: Code: * Example generated by -dataex-. To…
Merging panel data and analysisHello everyone, I intend to analyse panel data (long format) on effects of individuals taking a par…
Multivariate Random Effects Meta-regressionHello! Does anyone have an appropriate syntax for this in a pooled analysis of RR/95% CIs with vari…
Subscribe to:
Post Comments (Atom)
0 Response to Split to multiple files, merge and append
Post a Comment