Hello everyone,
I am working on a dataset containing a sample announcement dates (each standing for one acquisition made by one firm) and the firms that made the acquisition (identified by a unique identifier: scusip)
Now I need to assign all acquisitions to two subsamples. The subsamples are based on the number of other acquisitions made by the same firm that fall within any 5 year window around the announcement date of the focal acquisition.
What I am looking for is a way to find the maximum number of acquisitions that falls within any 5 year window of the focal acquisition. I do not need to know the exact window which yields the maximum number, only the number itself.
What I find difficult is that it can be any 5 year window.
I have not had any idea how to approach this so far, so all help is appreciated!
I attached an example of how my dataset looks like.
Thank you
Related Posts with Counting events falling in any 5 year window around the focal event
Panel graph with country names attachedHi all, I'm using panel data on public debt from 1980 to 2015. What I would like to do is a xtline …
efficiently calculating leave-out median of a variable by groups with weightsI would like to calculate the leave-out weighted median of a variable within groups. The following c…
Diff-in-Diffs with time-varying treatment effect and variation in treatment timingDear all, My question is related to those in here and here. Yet, I believe that none of them addres…
Membership functions and fuzzy sets in StataHi, I have a data set on which I want to make Qualitative Comparative Analysis using fuzzy logic. Bu…
multiple imputation chained equationsDear all, i am trying to impute some 75 continuous variables with 500 observations using mi impute c…
Subscribe to:
Post Comments (Atom)
0 Response to Counting events falling in any 5 year window around the focal event
Post a Comment