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
Threshold regressionI need your help. My model is Yit=a1(1-I*)(D-D*)+a2xI*(D-D*)+bxXit+eit while I*=1 if D>D* and I*=…
Foreach and string variablesI have a panel data set with country, years, and the following three (relevant) variables: C (float…
Looping within a loopHello, I am using a panel dataset. It both id and ic variable (ic: income category: HI, LI, LMI, UMI…
Problem with hausman testIm using stata 12 and I have a result like this Code: . hausman fe re ---- Coef…
Help in dealing with messy longitudinal line graphGreetings, I'm running Stata 15.1 on OSX. Using data from the general social survey, I'm attempting…
Subscribe to:
Post Comments (Atom)
0 Response to Drop if Strmatch with multiple conditions
Post a Comment