Hello
I am interested in estimating a regression where I use diff in diff following an IPO event, based on a certain factor. The estimation is for 3 years windows before and after an IPO event.
meaning:
sales= b1+b2*Post_IPO+b3*Factor+b4*Post_IPO*Factor
The coefficient of interest is b4.
The data I have after the calculation of the factor manipulation is of the following structure:
The original sample is a "usual" panel data. I use an overlapping dataset but treat each IPO year sample as independent (see table below). So, for example, for year 1991 I have two observations for firm a: one for the 1993 IPO and one for the 1994 IPO.
t | company | year | sales | Post Ipo | year ipo | factor |
y-3 | a | 1990 | k1 | 0 | 1993 | 0.8 |
y-2 | a | 1991 | k2 | 0 | 1993 | 0.8 |
y-1 | a | 1992 | k3 | 0 | 1993 | 0.8 |
y | a | 1993 | k4 | 0 | 1993 | 0.8 |
y+1 | a | 1994 | k5 | 1 | 1993 | 0.8 |
y+2 | a | 1995 | k6 | 1 | 1993 | 0.8 |
y+3 | a | 1996 | k7 | 1 | 1993 | 0.8 |
y-3 | a | 1991 | l1 | 0 | 1994 | 0.5 |
y-2 | a | 1992 | l2 | 0 | 1994 | 0.5 |
y-1 | a | 1993 | l3 | 0 | 1994 | 0.5 |
y | a | 1994 | l4 | 0 | 1994 | 0.5 |
y+1 | a | 1995 | l5 | 1 | 1994 | 0.5 |
y+2 | a | 1996 | l6 | 1 | 1994 | 0.5 |
y+3 | a | 1997 | l7 | 1 | 1994 | 0.5 |
I am not sure how to adress this dataset in SAS if I want to add year and firm fixed effects and if I want to capture the 3 year difference I am interested in.
I thought about creating a new variable :company_year_IPO: a_1993, a_1994 and define class by company_year_IPO, year... but then how can I add firm fixed effects?
Thanks!!!
In the first record, sales is K1. Shouldn't there be a number there?
Is the problem that you don't know how to compute three year differences in SAS? Can you show us which three year differences you want, using sample of data (it can be made up data), addressing this K1 issue? Show us what you think it should be, then we can tell you how to program it.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.