本人有一份日交易数据。此外,现在有一个回购区间,知道起始时间和截止时间,想将回购区间数据合并到日交易数据中,希望设置一个回购区间内为1,其他为0的虚拟变量。但是在操作过程中存在一些疑问。
1.时间有的地方对不上,回购区间的起始、截止日期和交易日期存在不对应的现象,导致merge的时候会出现无数据现象。
2.怎么生成区间内为1的数据不会。
请教stata版的各位老师和同学了。
日期区间数据如下:
----------------------- copy starting from the next line -----------------------
------------------ copy up to and including the previous line ------------------
日交易数据如下:
----------------------- copy starting from the next line -----------------------
------------------ copy up to and including the previous line ------------------
这里展示的时代码000002的数据,它的截止日期就不存在对应的交易日,导致merge的时候数据为空。