Hello!

I have a weakly balanced dataset (2007-2019), in which 2015 is the year when the intervention started (time = 1). However, there are many id's that have no data available in the pre-intervention period (time = 0). I would like to tag id's for which the data are available in both pre- and post-intervention periods.

Thanks for help!

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input float(id year time)
42 2017 1
42 2019 1
42 2019 1
42 2019 1
42 2019 1
42 2019 1
42 2019 1
43 2014 0
43 2015 1
43 2015 1
44 2018 1
44 2019 1
44 2016 1
44 2019 1
44 2019 1
44 2019 1
44 2019 1
44 2019 1
44 2019 1
44 2018 1
44 2019 1
44 2018 1
44 2019 1
44 2019 1
44 2019 1
45 2017 1
46 2018 1
47 2016 1
47 2016 1
47 2018 1
47 2016 1
47 2019 1
47 2016 1
47 2016 1
48 2019 1
48 2018 1
48 2019 1
48 2018 1
48 2019 1
48 2018 1
48 2018 1
48 2018 1
48 2019 1
48 2019 1
48 2018 1
48 2018 1
48 2019 1
48 2019 1
48 2019 1
48 2019 1
48 2019 1
48 2019 1
48 2018 1
48 2019 1
48 2017 1
49 2016 1
49 2017 1
49 2015 1
49 2014 0
50 2018 1
50 2015 1
50 2018 1
end