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
Getting formula rightDear all, I want to calculate the following decomposition below, which synthesizes how much of the …
Fe glsHello, My data is suitable for FE model but with heteroscedasticity and autocorrelation, I want to c…
Generating groups by sets of consecutive numbersI am trying to create a new id variable in a dataset by id and a set of consecutive numbers. For exa…
How Do I Use a Seemingly Unrelated Regression To Compare the Magnitude of AMEs Between Two Models with Different Dependent Variables?Let's say I have two DVs, Anti-Muslim Sentiment (ranging continuous 0 to 1 inclusive) and Anti-Abori…
Using statplot to plot averages of one variable, grouped by a list of different variablesHello, Apologies for the potentially confusing title. This is my first post on Statalist and I coul…
Subscribe to:
Post Comments (Atom)
0 Response to Counting events falling in any 5 year window around the focal event
Post a Comment