Dear statalists,
I encounter a problem related to keeping part of the data by different dates. I have around 1 million of observations with firms and date, but I want to keep the observations with specific dates, for example one day before and one day after 25jan2011, 04feb2011, 16march2011, 24march2011. I've copied part of my data using dataex. I would be very grateful if anyone can help me out!
I encounter a problem related to keeping part of the data by different dates. I have around 1 million of observations with firms and date, but I want to keep the observations with specific dates, for example one day before and one day after 25jan2011, 04feb2011, 16march2011, 24march2011. I've copied part of my data using dataex. I would be very grateful if anyone can help me out!
Code:
* Example generated by -dataex-. For more info, type help dataex clear input long date str6 firm 18630 "004073" 18631 "004073" 18632 "004073" 18633 "004073" 18634 "004073" 18637 "004073" 18637 "004073" 18638 "004073" 18639 "004073" 18639 "004073" 18640 "004073" 18640 "004073" 18640 "004073" 18640 "004073" 18640 "004073" 18640 "004073" 18640 "004073" 18640 "004073" 18640 "004073" 18640 "004073" 18640 "004073" 18640 "004073" 18640 "004073" 18641 "004073" 18645 "004073" 18646 "004073" 18647 "004073" 18647 "004073" 18647 "004073" 18647 "004073" 18647 "004073" 18647 "004073" 18647 "004073" 18648 "004073" 18651 "004073" 18652 "004073" 18652 "004073" 18652 "004073" 18652 "004073" 18653 "004073" 18653 "004073" 18653 "004073" 18653 "004073" 18653 "004073" 18653 "004073" 18653 "004073" 18653 "004073" 18653 "004073" 18653 "004073" 18653 "004073" 18653 "004073" 18653 "004073" 18653 "004073" 18653 "004073" 18653 "004073" 18653 "004073" 18653 "004073" 18653 "004073" 18653 "004073" 18653 "004073" 18653 "004073" 18653 "004073" 18653 "004073" 18653 "004073" 18653 "004073" 18653 "004073" 18653 "004073" 18653 "004073" 18653 "004073" 18653 "004073" 18653 "004073" 18653 "004073" 18653 "004073" 18653 "004073" 18653 "004073" 18653 "004073" 18654 "004073" 18654 "004073" 18654 "004073" 18654 "004073" 18654 "004073" 18654 "004073" 18654 "004073" 18654 "004073" 18654 "004073" 18654 "004073" 18655 "004073" 18655 "004073" 18655 "004073" 18658 "004073" 18659 "004073" 18659 "004073" 18660 "004073" 18660 "004073" 18661 "004073" 18662 "004073" 18665 "004073" 18666 "004073" 18667 "004073" 18668 "004073" end format %td date
Comment