Hello!
I am new to programming and need some help with basic subsetting in R. Hoping someone is willing to help as an easy summer challenge!
Dataset:
127 000 successful & unsuccesful acquisition bids in the US, 01/01/80 - 31/12/20 (see attached file).
Variables:
- Bid announcement date
- Bid completion date (if successful)
- Deal status
- Target ID
- Acquirer ID
- % acquired
- % sought
- Competing bid flag (YES/NO) - mostly blank observations
- Divestiture flag (YES/NO)
I want to subset the dataset into two samples:
- Single bidder sample (no competing bids)
- Competition sample (two or more bidders)
The competition sample is defined by two possible scenarios:
1. Exactly two bids
- 2 bids announced for the same target + 1 bid completed with at least 50% acquired = competition
- 2 bids completed + 1 bid acquires at least 50% +
- Competing bid flag = YES, or
- Announcement dates <= 12 months apart + bid 1 is not completed before bid 2 is announced + divestiture = NO
= competition
2. Multiple bids
- 2+ bids announced for the same target + 1 bid completed with at least 50% acquired = competition
- 2+ bids completed + 1 bid acquires at least 50% +
- Competing bid flag = YES, or
- No bid is completed before other bids are announced + divestiture flag = NO
= competition
Thanks a lot!
Screenshot of dataset: