02-20-2018 01:36 PM
I need help in generating graph by using GTL. My requirement is to create two graphs (one for each treatment) and they should be side by side (Please see attachment - Requirement.docx).
Study duration is on X-axis and subject number will be on Y-axis. I created this output by using proc gplot and PROC GREPLAY. First created two individual plots by using PROC GPLOT and used PROC GREPLAY to get two graphs onto single page side by side.
I tried to get this graph by using PROC SGPANEL. with this procedure all the subject numbers from both treatment groups are present on Y-axis and second treatment subject numbers on the top and first treatment subject numbers are below (please see the attachment - sgpanel output).
SAS code I have used for the scatter plot as below:
proc sgpanel data=ae ;
panelby trt01pn sort/ layout=lattice;
scatter x=dur y=subjid;
Sample data is provided in aegraph.xls
02-20-2018 09:10 PM
You will need to process the data to get SAS date variables. See Adverse Event Timeline article for ideas on how to do this.
02-21-2018 09:33 AM
Thanks for your reply Sanjay.
I think I am not clear with my question.
My main concern is to get the two panels side by side with subject numbers on each y-axis (similar to Requirement.docx). In the SGPANEL output all subject are present on single y-axis on the left side with second treatment subjects on the top and below first treatment subjects. I want two graphs with subject numbers on the y-axis and the values (highlow plot or scatter plot) on each of them side by side not on one above the other.
This can be done by SGPANEL or not.
All other lines can be done using high low plot will come in next step.
02-21-2018 09:56 AM
Yes, you can use SGPANEL to get a panel of adverse event graphs by some classifier. That is the easy part. You have to massage the data and use the right plots statements and options to get the appropriate graph in each cell.
02-22-2018 10:13 AM
Hi Sanjay, I tried different options provided in the SAS documentation and not able to get the graphs with different y-axis as my requirement and there are no examples available with similar case. Is there any post or example available from your blog, can you share it with me.