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
How to plot a scatter graph with just a few dots around a fitted line?Hi just wondering how to plot a scatter graph with just a few dots around a fitted line like that in…
Data interpretationHelp please with interpretation. Code: xtpcse ta rank score b safety health human ict prioritizatio…
Graph title in different colors to replace legendHi, I am trying to use the graph title to replace the legend. In this example, I would like the wor…
RESET testHi, How can I run the RESET test for a gravity model with pair-fixed effects?: ppmlhdfe TRADE RTA …
Plotting variable for 5th and 25th day each month for multi-month panel data Hello (new here so excuse if my jargon sounds odd) For my panel data (going from 1st Jan 2012 - 30 …
Subscribe to:
Post Comments (Atom)
0 Response to Drop if Strmatch with multiple conditions
Post a Comment