HI All,
I need to generate a Graph for AE data for each subject considering AE Start, End date, Relation, Action taken and AE Outcome. Please refer sample Graph attached. I am using SAS 9.4
I have a derived dataset of AEstdy and AEenddy. (Ex: AEstdy=5 means AE started n 5th day from the first dose given)
Requirement:
1. X-Axis should be have data points from AE start and end day. Ex: consider 0 to 200.
2. Y axis should be grouped with Adverse event.
3. For each subject we should have a separate page where we have to show the vector line from which day it started till ended. also we have to show Relation, Action taken and AE Outcome, Severity on top of the vector line with some codes (1,2,3 for actual values) and we should indicate these codes in the form of legends at the end of the page to understand.
please refer attached image where I need similar Graph , request you to help me on this. Please consider similar variable names and provide SGPLOT code get this kind of Graph.
Start by going to Graphically Speaking https://blogs.sas.com/content/graphicallyspeaking/ and searching for "Adverse Event".
Also see http://support.sas.com/documentation/prod-p/grstat/9.4/en/PDF/odsadvg.pdf
Hi Reeja,
Thanks for response. please see mock data below. Also see the expected graph in the attachment. Please check and provide code.
Sub | AE Term | Start DT | End Dt | Relation | Relation Code | Action taken | Action Code | Outcome | Outcome Code | AE Start day | AE End day |
100 | ABC | yes | 2 | None | 1 | recovered | 1 | 7 | 54 | ||
100 | CDE | No | 1 | None | 1 | resolving | 2 | 12 | 19 | ||
100 | ache | No | 1 | Interrupted | 2 | resolving | 2 | 33 | 44 | ||
100 | aaaa | yes | 2 | Interrupted | 2 | resolving | 2 | 12 | 18 | ||
100 | gggg | yes | 2 | Discon | 3 | resolving | 2 | 22 | 55 | ||
100 | eeee | No | 1 | None | 1 | recoverd | 1 | 13 | 14 | ||
100 | tttt | No | 1 | None | 1 | resolving | 2 | 16 | 19 | ||
100 | yyyyy | yes | 2 | Discon | 3 | recoverd | 1 | 4 | 20 |
I'm sorry, I can't write the code for you - I don't know how and can't spend that much time on this question.
Your graph in the Word Doc is unclear and your data appears unsummarized at this point. I'm not sure if the graph requires the detailed level so you may want to pre-summarize your data to graph. I did do a quick search on lexjansen earlier and did find many different examples that can help you get started.
Hari2,
Simply put, if you want someone to do your job for you, then you can't expect a free forum to provide you with help. However, there are SAS conference papers galore that will give you code to do what you want at http://www.lexjansen.com, or you could search SAS Blogs like Graphical Speaking, or indeed my own blog at http://blog.hollandnumerics.org.uk includes a paid-for forum for answers to SAS-related questions.
To be a SAS programmer you have to be self-sufficient, and part of that is to be able to solve your own problems yourself by searching the available documentations and papers!
........Phil
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.