Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 72776

problem in reshaping data

$
0
0
Hello!

I have panel data in long format on mergers and acquisitions: acquirers, (uniquely identified by their cusip ("acusip")) that made several acquisitions in the course of time. Targets are also identified by their cusip number ("tcusip"). I ranked the targets of each bidder according to the effective time of the deal ("datee"). (egen rank=rank(datee), by (acusip)) so, that for each acquiror, I know his first, second, etc. target.

Then, I wanted to reshape the data into a wide format (reshape wide tcusip, i(acusip) j(rank) but I got the following error:

"rank not unique within acusip;
there are multiple observations at the same rank within acusip."

Apparently, some deals have the exact same date, so when ranked, they got the average (for example, the 3rd and 4th target were acquired on the same date, so they both have a rank of 3.5).

Please, help me out of this situation! Thanks heaps!



Viewing all articles
Browse latest Browse all 72776

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>