Hello. I am research student that is new to STATA and I am trying to learn how to create a drug classification variable in my dataset. I have a variable with generic drug name, dose, and form (ex. labetalol 200 mg tablet). I would like to write a code that tells STATA to find a list of drug names, for example "labetalol", "atenolol", "carvedilol" and label them as a "beta blocker" in the new variable drug classification.
I have tried using the find and replace method as detailed in other forums but have been unsuccessful with the codes. Thanks in advance for the help.