- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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;
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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/
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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!