BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
einstein
Quartz | Level 8

I'm trying to limit the survival estimates graph to only display data up to 72 hours.  Right now the data is displaying unto 100 hours.  My original survial time data was in seconds so I converted it to hours and altered the template to have a viewmax=72.  But this seems to give me the following error: 

 

WARNING: Insufficient data to produce 'Stat.Lifetest.Graphics.ProductLimitSurvival' Graph.

 

I don't get this error if I simply ran the code without a viewmax=72 limit.  Does anyone know what I must be doing wrong?

 

data linex; set line;
*where survival_time <='72:00:00't;
survival_timex=survival_time*0.000277778;
run;

ods path show;
proc template;
 define statgraph Stat.Lifetest.Graphics.ProductLimitSurvival; 
 
  begingraph;
   layout overlay /
    xaxisopts=(label="Survival Time (Hours)" offsetmin=.05 
	linearopts=( viewmax=80 tickvaluelist=(0 20 40 60 72)));
   endlayout;
  endgraph;
 end;
run;

ods graphics on;
ODS TRACE ON;

Proc lifetest data=linex plots=(s, lls) graphics;
	Time survival_timex*delta(0);
	Strata final_placement;
	Format final_placement treatment_assignment_.;
Run;
ods graphics off;

 proc template;
      delete Stat.Lifetest.Graphics.ProductLimitSurvival;
 run;
1 ACCEPTED SOLUTION

Accepted Solutions
einstein
Quartz | Level 8

Thank you Reeza!

 

Apparently, you need to include all the syntax in the proc template for it to work properly.

 

This link was a great resource for anyone who needs it: http://support.sas.com/kb/43/910.html 

 

Thank you SAS Community!

View solution in original post

2 REPLIES 2
Reeza
Super User

Is the only reason you're using PROC TEMPLATE to control the x axis?

You can use the macros in the documentation, have you tried playing around with those?

 

The ViewMax appears to be the right option, so I suspect the issue is somewhere else. Generally when this happens I start from scratch and change one thing at a time until it works 😉

 

 

Here's a link that goes over how to do all the changes for PROC LIFETEST:

http://blogs.sas.com/content/graphicallyspeaking/2017/06/12/customizing-kaplan-meier-plot/

einstein
Quartz | Level 8

Thank you Reeza!

 

Apparently, you need to include all the syntax in the proc template for it to work properly.

 

This link was a great resource for anyone who needs it: http://support.sas.com/kb/43/910.html 

 

Thank you SAS Community!

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 2 replies
  • 4531 views
  • 0 likes
  • 2 in conversation