Hello everyone,
I'm new to STATA and i have the following problem:
I want to drop all observations, that don't contain the words "Mergers" or "Acquisition" for the Variable (String) "Dealtype".
I used the following Drop if Strmatch formula:
drop if strmatch(Dealtype, "*Merger*")==0
worked just fine but then STATA deletes everything, that isn't named Merger. How can i add the Condition to delete all Observations, if the Variable "Dealtype" doesn't contain the words "Merger" OR "Acquisition"?
Hope you can help me out.
Related Posts with Drop if Strmatch with multiple conditions
weighted averageHi, I have a database of donations and I want to use it to generate a new var to indicate donors ide…
Getting STATA to loop phrases (2 or more words with spaces in between)Hello, I'm trying to construct a foreach loop where I am using a few words as the phrase to loop o…
adding 100 rows in a matrix from different 100 matricesHello, I am trying to make a column matrix (100X1) using different 100 matrices? What is the best po…
Effect size logit regression with sqaure terms and interactionsDear STATA users, I am running a model with a logit regression (binary DV), in which I include my I…
Stata Version and MEOLOGIT Model ConvergenceBasic question here, but when collaborating on analysis with a colleague with a different version of…
Subscribe to:
Post Comments (Atom)
0 Response to Drop if Strmatch with multiple conditions
Post a Comment