Hi all,
I am very new to Stata. I have a few variables, and two of them are string: open_on, close_on. I want to keep only the sample where open_on is filled or close_on is filled or both are filled. I know my question sounds very easy...but I just do not how to convert it into a conditional code.
I tried:
But only observations where both are filled are kept. I am not sure why.
I would deeply appreciate your assistance!
I am very new to Stata. I have a few variables, and two of them are string: open_on, close_on. I want to keep only the sample where open_on is filled or close_on is filled or both are filled. I know my question sounds very easy...but I just do not how to convert it into a conditional code.
I tried:
Code:
drop if opened_on == "" | closed_on == ""
I would deeply appreciate your assistance!
Comment