Hi all
How can I separate dataset by variable yearmonth. Which mean save the same year observations in a dataset. (For example, save the dataset below as 4 datasets.)
Best,
Jack Liang
----------------------- copy starting from the next line -----------------------
------------------ copy up to and including the previous line ------------------
How can I separate dataset by variable yearmonth. Which mean save the same year observations in a dataset. (For example, save the dataset below as 4 datasets.)
Best,
Jack Liang
----------------------- copy starting from the next line -----------------------
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float(yearmonth id) 201501 1 201512 2 201601 3 201603 3 201709 4 201711 5 201801 6 201802 7 201803 7 201804 8 end
Comment