Hi. I have data on drug names under a variable named "Product" with corresponding payments under a variable named "rxsf". I want to plot the distribution of payments for each drug separately with the file titaled with the drug name. So, in the code below, I'd have one graph that illustrates the distribution of FEMRING and this file would be titled "femring", followed by a separate file each for VYTORIN, TRULICITY, etc.
I'm a little confused on how to do this since it's the distribution of one variable (rxsf) by different categories (drug names) but where the drug names don't follow a specific pattern to call them out separately in the code, and since a separate graph is to be generated for each drug. Any help will be much appreciated.
I'm a little confused on how to do this since it's the distribution of one variable (rxsf) by different categories (drug names) but where the drug names don't follow a specific pattern to call them out separately in the code, and since a separate graph is to be generated for each drug. Any help will be much appreciated.
Code:
input str35 Product float rxsf "FEMRING" 40 "FEMRING" 200 "FEMRING" 75 "FEMRING" 105 "FEMRING" 60 "VYTORIN" 40 "VYTORIN" 0 "VYTORIN" 55 "VYTORIN" 40 "TRULICITY" 55 "TRULICITY" 55 "TRULICITY" 50.09998 "TRULICITY" 40 "TRULICITY" 150 "TRULICITY" 375 "TRULICITY" 60 "TALTZ" 90 "TALTZ" 0 "TALTZ" 35 "TALTZ" 46.65997 "TALTZ" 100 "TALTZ" 35 "TALTZ" 80 "TALTZ" 80 "TALTZ" 80
Comment