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
Problem with specifying count data modelsDear Statalists, I am performing nonlinear regression analysis and despite using several books on m…
"Count if" with two conditionsHi everyone, I have cross-sectional loan data from 2007-2010. For each year I have at least 100 obs…
Need help with psmatch2Dear Members of Statalist, this is my first post here in this forum. First of all, I am using Stata…
variable already defined error in the foreach loopHello, I am trying to make a use of the Python-Stata interface in Stata foreach loop. My loop is sho…
Best Panel Data ModelI got a problem about panel data, I have micro panel data with 15.689 observation in 7 years. when …
Subscribe to:
Post Comments (Atom)
0 Response to Drop if Strmatch with multiple conditions
Post a Comment