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;
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!
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/
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!
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: