I have the data below:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float(id x1 x2) str10 date 1 1 10 "24/09/2013" 1 1 12 "25/09/2013" 2 1 13 "24/09/2013" 2 1 15 "25/09/2013" 3 2 12 "05/10/2014" 3 2 17 "06/10/2014" 4 3 10 "05/10/2014" 4 3 9 "06/10/2014" 5 3 8 "05/10/2015" 5 3 12 "06/10/2015" end
I need to create missing values for each id corresponding to 3 days before its date and 3 days after its date. How can I do that, please? So each id would have 2 obs with x1 non missing and 6 obs with x1 missing.
Many thanks. :-)
0 Response to Fillin/expand with panel and different dates
Post a Comment