Dear Statalist users
I am working on Pandemic Crisis. I need to drop all those firms/observations that have YEDate from 1 February 2020 to 31 May 2020 which belong to Data_Year 2019. I want to keep all those firms that have YEDate in these months for other periods, but not for Data_Year 2019.
I am using
But it says
even though there are observations with this YEDate.
Can you please help me?
Thanks
Qazi
I am working on Pandemic Crisis. I need to drop all those firms/observations that have YEDate from 1 February 2020 to 31 May 2020 which belong to Data_Year 2019. I want to keep all those firms that have YEDate in these months for other periods, but not for Data_Year 2019.
I am using
Code:
drop if Data_Year==2019 & YEDate=="2/1/2020"
Code:
(0 observations deleted)
Can you please help me?
Thanks
Qazi
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str10 YEDate int Data_Year " 1/1/2019" 2018 " 1/1/2021" 2020 " 1/1/2022" 2021 " 1/1/2022" 2021 " 1/1/2022" 2021 " 1/1/2022" 2021 " 1/1/2022" 2021 " 1/2/2020" 2019 " 1/2/2021" 2020 " 1/2/2021" 2020 " 1/2/2021" 2020 " 1/2/2022" 2021 " 1/2/2022" 2021 " 1/2/2022" 2021 " 1/2/2022" 2021 " 1/2/2022" 2021 " 1/2/2022" 2021 " 1/2/2022" 2021 " 1/2/2022" 2021 " 1/3/2019" 2018 " 1/3/2020" 2019 " 1/3/2021" 2020 " 1/3/2021" 2020 " 1/3/2021" 2020 " 1/3/2021" 2020 " 1/4/2019" 2018 " 1/4/2020" 2019 " 2/1/2020" 2019 " 2/2/2019" 2018 " 2/2/2020" 2019 " 2/3/2018" 2017 " 2/3/2019" 2018 " 2/4/2018" 2017 " 3/1/2018" 2017 " 3/1/2020" 2019 " 3/2/2019" 2018 " 3/3/2018" 2017 " 3/3/2021" 2020 " 3/3/2022" 2021 " 3/5/2022" 2021 " 3/6/2021" 2020 " 3/7/2020" 2019 " 3/9/2019" 2018 " 4/1/2018" 2017 " 4/1/2018" 2017 " 4/1/2019" 2018 " 4/1/2019" 2018 " 4/2/2018" 2017 " 4/2/2018" 2017 " 4/2/2021" 2020 " 4/2/2022" 2021 " 4/2/2022" 2021 " 4/2/2022" 2021 " 4/3/2020" 2019 " 4/3/2020" 2019 " 4/3/2021" 2020 " 4/3/2021" 2020 " 4/3/2021" 2020 " 4/4/2021" 2020 " 4/4/2021" 2020 " 4/4/2021" 2020 " 4/5/2020" 2019 " 5/1/2021" 2020 " 5/1/2021" 2020 " 5/2/2020" 2019 " 5/2/2020" 2019 " 5/2/2021" 2020 " 5/2/2021" 2020 " 6/2/2019" 2018 " 6/3/2018" 2017 " 7/1/2017" 2017 " 7/1/2017" 2017 " 7/1/2017" 2017 " 7/1/2017" 2017 " 7/1/2017" 2017 " 7/1/2018" 2018 " 7/1/2018" 2018 " 7/1/2018" 2018 " 7/1/2021" 2021 " 7/2/2017" 2017 " 7/2/2020" 2020 " 7/3/2021" 2021 " 7/3/2021" 2021 " 7/3/2021" 2021 " 8/1/2020" 2020 " 8/3/2018" 2018 " 9/1/2018" 2018 " 9/1/2018" 2018 " 9/2/2017" 2017 " 9/2/2017" 2017 " 1/24/2021" 2020 " 1/25/2020" 2019 " 1/25/2020" 2019 " 1/25/2020" 2019 " 1/26/2019" 2018 " 1/26/2019" 2018 " 1/26/2019" 2018 " 1/26/2019" 2018 " 1/26/2020" 2019 " 1/27/2018" 2017 end

Comment