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.
Related Posts with How to create drug classification variable using generic drug name variable
Replace missing values smartlyHi all, I am writing since I have a potentially simple task which however I am not able to figure o…
Data for difference in differenceHello, I am currently doing my dissertation on the impact of minimum unit pricing on alcohol volume,…
Creating a large Dummy Variable tableGood afternoon, I am working with a dataset that looks at different funding structures for subsidiz…
invalid variable nameHi! I am trying to reshape my data. id Co base ID3 103 0 0 103_6_6 104 0 1 104_0_0 104 0 0 104_1_1 …
Multiplying a variable to generate anotherHi, for a project I have a variable for gross weekly earnings. I want to multiply this by 52 to crea…
Subscribe to:
Post Comments (Atom)
0 Response to How to create drug classification variable using generic drug name variable
Post a Comment