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
Recursive Bivariate probit model(rho & margianl effects)Dear Statalist, I am investigating the impact of a binary endogenous variable 'W(house own(own=1,re…
Problem with labels using graphHi there, I am using Stata 15 and I am having trouble using the command graph. This is the code I a…
Loop Regression - Multiple Xs and YsHi, I have a situation where i need to regress multiple dependent variables with multiple independen…
How to flag multiple duplicatesStata version 16.1 Hello Stata experts, I am using the following code to flag duplicates between da…
Heteroskedasticy in Ordered Probit Model: does "hetoprobit" command solves the problem? How?Hi! I'm conducting an study that aims to obtain the correlation between life satisfaction (dep. var…
Subscribe to:
Post Comments (Atom)
0 Response to Pre and post event
Post a Comment