Hi all,
I have a doubt about how to generate a variable that identifies loans that overlap each other based on the date they started/ended. My dataset is as follows:
So, basically, I want to tag those loans, per borrower ID, that are within the exact period of time or part of them (so, for the first borrower, first row = 0, but the other 2 must be =1 since the end date of one of the loans is greater than the start date of the other, and so on). I don't want to reshape since my dataset has millions of observations and using uniqueborrowerid as key is computationally heavy to do that (more than 600K unique ID).
Thanks!
I have a doubt about how to generate a variable that identifies loans that overlap each other based on the date they started/ended. My dataset is as follows:
Code:
clear input strL uniqueborrowerid float(start_date end_date) "26DKJJJ13EJ13E26DBJZ13E" 20927 21292 "26DKJJJ13EJ13E26DBJZ13E" 21329 21694 "26DKJJJ13EJ13E26DBJZ13E" 21693 22059 "26Z6613JJDJEILD26" 21206 21296 "26Z6613JJDJEILD26" 21274 21488 "26Z6613JJDJEILD26" 21518 21730 "26DKJJJ13EJ13E26DBJZ13E" 21509 22056 "26DKJJJ13EJ13E26DBJZ13E" 21693 22243 "26Z6613JJDJEILD26" 21158 23074 end format %td start_date format %td end_date
Thanks!

Comment