BookmarkSubscribeRSS Feed
mekalvk
Calcite | Level 5

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;
run;

 

Sample data is provided in aegraph.xls 

4 REPLIES 4
Jay54
Meteorite | Level 14

You will need to process the data to get SAS date variables.  See Adverse Event Timeline article for ideas on how to do this.

mekalvk
Calcite | Level 5

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.

 

Thanks

Vijaya

Jay54
Meteorite | Level 14

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.

mekalvk
Calcite | Level 5

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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 1052 views
  • 0 likes
  • 2 in conversation