I have panel data and I would like to expand the dataset by one month. So I would like to expand each "stock" time series to "2020m4". Here is the data I have:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input double stock float(date exret) 1 722 . 1 721 .016571907 1 720 -.021690037 2 722 -.08885346 2 721 .03352593 2 720 -.013057826 3 722 -.1733951 3 721 .05968564 3 720 -.13112126 4 722 .025679555 4 721 -.04374008 4 720 .05557474 5 722 -.023603665 5 721 -.005209302 5 720 .05193632 6 722 .01481354 6 721 -.04118994 6 720 .033280447 7 722 .04653623 7 721 -.04578867 7 720 .04011091 8 722 .07355644 8 721 -.03574601 8 720 .08482119 9 722 -.08222993 9 721 .06095662 9 720 -.0952904 10 722 -.05354553 10 721 .0007637492 10 720 -.09510595 end format %tm date label values stock unit_id label def unit_id 1 "130062", modify label def unit_id 2 "130088", modify label def unit_id 3 "130298", modify label def unit_id 4 "130502", modify label def unit_id 5 "130591", modify label def unit_id 6 "131844", modify label def unit_id 7 "132808", modify label def unit_id 8 "134057", modify label def unit_id 9 "13466Q", modify label def unit_id 10 "13471D", modify
0 Response to Expanding a time series dataset by one month
Post a Comment