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
ISOweek from dates in Stata: Code belowThere is no direct command for generating the ISOweek (ISO8601) from a date in Stata. The following …
New Stata module for robust estimation of production functionsA new Stata module for robust estimation of production functions is now available at the SSC archive…
Multi-level multiple imputation in a longitudinal dataset with three levelsI have a longitudinal dataset that is hierarchical in nature with repeated measures of outcomes take…
Summing a row for one observation onlyDear all, I would like to sum values that are in the same row but on different columns. For instanc…
How to change dot appearance in a marginsplot with recast(dot)?Hello all, Title is self explanatory. I'm presenting margins output in a marginsplot, and I'm choos…
Subscribe to:
Post Comments (Atom)
0 Response to Drop if Strmatch with multiple conditions
Post a Comment