Hello,
I am using Stata 16.1 and I have the following data:
gvkey fyear pifo
007435 2015 2424
007435 2016 2687
007435 2017 3399
007435 2018 3513
007435 2019 2704
007435 2020 2991
001078 2017 1923
001078 2018 3303
001078 2019 3188
001078 2020 3380
016101 2015 .
016101 2016 .
An event occurred in 2017.
I want to make a dummy variable which gives 1 for firms that have a value for PIFO (so not zero or .) and at least one value before the event (can be in 2015 or 2016) and at least one value after the event (can be 2018, 2019 or 2020).
The dummy should give 0 for firms with zero or . for PIFO and for firms without at least one value before and one value after the event date.
Any suggestion is appreciated.
Kind regards,
Sacha
Related Posts with Pre and post event
Using two panel datasets simultaneously: time dummies and cohort dummyHi I have a question about using two panel datasets simultaneously. My data consists of two cohorts…
General structure of data.How can I describe the structure of the dataset using summary statistics, graphical analysis and var…
quantile regressionHello everyone, I am doing an analysis on "Socio economic inequality on childhood health outcomes".…
RIF functionHello Everyone, I have been reading some literature on Recentered Influence function and Influence …
Graph the marginal effect of x1 on y (y-axis) against x2 (x-axis)?Dear All, Suppose I run the following regression: Code: // ssc install interflex, interactplot sysu…
Subscribe to:
Post Comments (Atom)
0 Response to Pre and post event
Post a Comment