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

I am running the following code:

 

data _null_;
%let url = //support.sas.com/documentation/onlinedoc/stat/ex_code/151;
infile "http:&url/templft.html" device=url;

file 'macros.tmp';
retain pre 0;
input;
_infile_ = tranwrd(_infile_, '&', '&');
_infile_ = tranwrd(_infile_, '&lt;' , '<');
if index(_infile_, '</pre>') then pre = 0;
if pre then put _infile_;
if index(_infile_, '<pre>') then pre = 1;
run;

%inc 'macros.tmp' / nosource;
%ProvideSurvivalMacros /* variables available. */
%let LegendOpts = ;
%let ntitles = 1;
%let TitleText1 = &titletext0 " for " STRATUMID;
%let TitleText2 = &titletext0;
%let yOptions = linearopts=(viewmin=0.8 viewmax=1
tickvaluelist=(0.8 1.0));
%let xOptions = label="Time to Implant Failure (in Months)"
linearopts=(viewmin=0 viewmax=36
tickvaluelist=(0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36));
%let GraphOpts = attrpriority=none
DataLinePatterns=(Solid ShortDash);
%let InsetOpts = autoalign=(BottomRight)border=true;
%let AtRiskOpts = display=(label) valueattrs=(size=7pt);
%let BandOpts = displayTail=false &groups modelname="Survival";
%CompileSurvivalTemplates /* Compile the templates with */
/* the new title. */

ODS LISTING image_dpi=300 GPATH = 'C:\Users\gscar\Desktop\Actis\Tables' style=statistical;
ODS GRAPHICS / RESET IMAGENAME = "Actis Stem Survival" IMAGEFMT=tiff HEIGHT=5in WIDTH=7in
attrpriority=Color;
proc lifetest data = actis.consented plots=survival outsurv=actis.KM_curve alpha=0.05;
time TT_dod_rev_censor_mos *revised_deceased(0) ;*(1) is event time, (0) is censor time;
*strata ;
label TT_dod_rev_censor_mos = 'Time (in Mos) to Implant Failure';
run;

 

Is it possible to add HW confidence bands to the curve? I have tried adding (cb=hw) option but it has not worked. Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

WARNING: HTML4 destination does not support TIFF images. Using the default static format.

 

You set the output to TIFF format:

 

ODS GRAPHICS / RESET IMAGENAME = "Actis Stem Survival" IMAGEFMT=tiff HEIGHT=5in WIDTH=7in
attrpriority=Color;

 

Change that to a different file format and it should be fine, see the list of valid options here:

https://documentation.sas.com/?docsetId=odsproc&docsetTarget=p0kroq43yu0lspn16hk1u4c65lti.htm&docset...

 


@GS2 wrote:
When I run that code I get the following note in the log and the confidence bands do not show on the graph. It indicates in the legend they are there but does not show on the graph.

NOTE: The LOGLOG transform is used to compute the confidence limits for the quartiles of the
survivor distribution and the confidence limit for the survivor function. To suppress using
this transform, specify CONFTYPE=LINEAR in the PROC LIFETEST statement.
WARNING: HTML4 destination does not support TIFF images. Using the default static format.

 

View solution in original post

3 REPLIES 3
Reeza
Super User

Is it possible to add HW confidence bands to the curve? I have tried adding (cb=hw) option but it has not worked. 

That is the correct method for adding bands to your plot. 

 

This example here (builds on prior) shows how to include it in your PROC code 

https://documentation.sas.com/?docsetId=statug&docsetTarget=statug_kaplan_sect033.htm&docsetVersion=...

 

proc lifetest data = actis.consented plots=survival(cw=hw) outsurv=actis.KM_curve alpha=0.05;

Please try and format your code before posting, it's hard to even see your PROC in the current layout.

 


@GS2 wrote:

I am running the following code:

 

data _null_;
%let url = //support.sas.com/documentation/onlinedoc/stat/ex_code/151;
infile "http:&url/templft.html" device=url;

file 'macros.tmp';
retain pre 0;
input;
_infile_ = tranwrd(_infile_, '&amp;', '&');
_infile_ = tranwrd(_infile_, '&lt;' , '<');
if index(_infile_, '</pre>') then pre = 0;
if pre then put _infile_;
if index(_infile_, '<pre>') then pre = 1;
run;

%inc 'macros.tmp' / nosource;
%ProvideSurvivalMacros /* variables available. */
%let LegendOpts = ;
%let ntitles = 1;
%let TitleText1 = &titletext0 " for " STRATUMID;
%let TitleText2 = &titletext0;
%let yOptions = linearopts=(viewmin=0.8 viewmax=1
tickvaluelist=(0.8 1.0));
%let xOptions = label="Time to Implant Failure (in Months)"
linearopts=(viewmin=0 viewmax=36
tickvaluelist=(0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36));
%let GraphOpts = attrpriority=none
DataLinePatterns=(Solid ShortDash);
%let InsetOpts = autoalign=(BottomRight)border=true;
%let AtRiskOpts = display=(label) valueattrs=(size=7pt);
%let BandOpts = displayTail=false &groups modelname="Survival";
%CompileSurvivalTemplates /* Compile the templates with */
/* the new title. */

ODS LISTING image_dpi=300 GPATH = 'C:\Users\gscar\Desktop\Actis\Tables' style=statistical;
ODS GRAPHICS / RESET IMAGENAME = "Actis Stem Survival" IMAGEFMT=tiff HEIGHT=5in WIDTH=7in
attrpriority=Color;
proc lifetest data = actis.consented plots=survival outsurv=actis.KM_curve alpha=0.05;
time TT_dod_rev_censor_mos *revised_deceased(0) ;*(1) is event time, (0) is censor time;
*strata ;
label TT_dod_rev_censor_mos = 'Time (in Mos) to Implant Failure';
run;

 

Is it possible to add HW confidence bands to the curve? I have tried adding (cb=hw) option but it has not worked. Thank you


 

GS2
Obsidian | Level 7 GS2
Obsidian | Level 7
When I run that code I get the following note in the log and the confidence bands do not show on the graph. It indicates in the legend they are there but does not show on the graph.

NOTE: The LOGLOG transform is used to compute the confidence limits for the quartiles of the
survivor distribution and the confidence limit for the survivor function. To suppress using
this transform, specify CONFTYPE=LINEAR in the PROC LIFETEST statement.
WARNING: HTML4 destination does not support TIFF images. Using the default static format.
Reeza
Super User

WARNING: HTML4 destination does not support TIFF images. Using the default static format.

 

You set the output to TIFF format:

 

ODS GRAPHICS / RESET IMAGENAME = "Actis Stem Survival" IMAGEFMT=tiff HEIGHT=5in WIDTH=7in
attrpriority=Color;

 

Change that to a different file format and it should be fine, see the list of valid options here:

https://documentation.sas.com/?docsetId=odsproc&docsetTarget=p0kroq43yu0lspn16hk1u4c65lti.htm&docset...

 


@GS2 wrote:
When I run that code I get the following note in the log and the confidence bands do not show on the graph. It indicates in the legend they are there but does not show on the graph.

NOTE: The LOGLOG transform is used to compute the confidence limits for the quartiles of the
survivor distribution and the confidence limit for the survivor function. To suppress using
this transform, specify CONFTYPE=LINEAR in the PROC LIFETEST statement.
WARNING: HTML4 destination does not support TIFF images. Using the default static format.

 

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1335 views
  • 0 likes
  • 2 in conversation