Dear Stata Listers,
I am working with a (psuedo) panel dataset of firm acquisitions, trying to calculate a recency weighted cumulative 'experience' variable (i.e., sum of acquisitions). My problem is similar to another that was posted & answered last year (see attached link), except that the time between each observation is not evenly spaced in my dataset. Rather, I need to include the number of days since the last acquisition in the discounting equation. I've tried substituting that into the macro provided in the link, but it doesn't work. My data looks something like this:
days = the number of days since the last acquisition
days_cum = the number of days since the first acquisition
fullacq = full acquisitions (I include this as the variable that will need to be summed)
I need to discount each observation by the square root of the number of days between any given acquisition and the current time period. So for example, for Acquiror 1:
exp (at time 1) = 1
exp (at time 2) = 1 + 1/sqrt(1176)
exp (at time 3) = 1 + 1/sqrt(145) + 1/sqrt(145+1176)
Any help would be greatly appreciated.
All the best,
Joseph Harrison
PhD Student
Texas A&M University
[email protected]
I am working with a (psuedo) panel dataset of firm acquisitions, trying to calculate a recency weighted cumulative 'experience' variable (i.e., sum of acquisitions). My problem is similar to another that was posted & answered last year (see attached link), except that the time between each observation is not evenly spaced in my dataset. Rather, I need to include the number of days since the last acquisition in the discounting equation. I've tried substituting that into the macro provided in the link, but it doesn't work. My data looks something like this:
acquirorid | year | time | date | days | days_cum | fullacq | exp |
1 | 1999 | 1 | 5/5/99 | 0 | 0 | 1 | |
1 | 2002 | 2 | 7/24/02 | 1176 | 1176 | 1 | |
1 | 2003 | 3 | 1/30/03 | 145 | 1321 | 1 | |
2 | 1994 | 1 | 2/23/94 | 0 | 0 | 1 | |
2 | 1994 | 2 | 6/3/94 | 155 | 155 | 1 | |
2 | 1995 | 3 | 4/13/95 | 393 | 548 | 1 | |
2 | 1996 | 4 | 1/5/96 | 246 | 794 | 1 | |
2 | 1996 | 5 | 11/1/96 | 369 | 1163 | 1 | |
2 | 1997 | 6 | 4/1/97 | 160 | 1323 | 1 | |
2 | 1997 | 7 | 7/2/97 | 106 | 1429 | 1 |
days = the number of days since the last acquisition
days_cum = the number of days since the first acquisition
fullacq = full acquisitions (I include this as the variable that will need to be summed)
I need to discount each observation by the square root of the number of days between any given acquisition and the current time period. So for example, for Acquiror 1:
exp (at time 1) = 1
exp (at time 2) = 1 + 1/sqrt(1176)
exp (at time 3) = 1 + 1/sqrt(145) + 1/sqrt(145+1176)
Any help would be greatly appreciated.
All the best,
Joseph Harrison
PhD Student
Texas A&M University
[email protected]
Comment