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

Hi

I have a pretty basic problem, but I am a new user of SAS, and I am stuck. 

I am applying proc lifetest to produce graphs. My problem is that the plots produces lines with circles. I can not find any describtions, informing me about what these circles illustrates, not can I figure out a command to remove them from my graph.

I am using SAS version 9.4. 

Hope anyone has some input. Thanks 🙂 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

I assume you are seeing graphs like in this documentation example:

http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_lifetest_exa...

 

If you are referring to the plots, the "circles" are markers that indicate the observations in your data set. The lines are drawn to show trends and relationships.

 

You can use ODS OUTPUT to save the data that underlies a graph and then use PROC SGPLOT to create a new graph. The technique is described in the article "How to get data values out of ODS graphics":

 

 

ods output NegLogSurvivalPlot=SurvPlot;
proc lifetest data=Exposed plots=(survival(atrisk) logsurv);
   time Days*Status(0);
   strata Treatment;
run;

proc sgplot data=SurvPlot;
series x=Time y=__Log_Survival__ / group=Stratum;
run;

 

View solution in original post

4 REPLIES 4
Reeza
Super User

Post your code and a copy of the image please. 

Natacha
Calcite | Level 5
Hi
I cannot copy my exact code or output as I am not allowed to do so.
But this is how I coded it:
proc lifetest data=X plots=(s, lls) notable; time
timevariable*outcomevariable (0); strata exposurevariable;

My outcome looks like this:

[image: Billede indsat i tekst 1]

##- Please type your reply above this line. Simple formatting, no
attachments. -##
Rick_SAS
SAS Super FREQ

I assume you are seeing graphs like in this documentation example:

http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_lifetest_exa...

 

If you are referring to the plots, the "circles" are markers that indicate the observations in your data set. The lines are drawn to show trends and relationships.

 

You can use ODS OUTPUT to save the data that underlies a graph and then use PROC SGPLOT to create a new graph. The technique is described in the article "How to get data values out of ODS graphics":

 

 

ods output NegLogSurvivalPlot=SurvPlot;
proc lifetest data=Exposed plots=(survival(atrisk) logsurv);
   time Days*Status(0);
   strata Treatment;
run;

proc sgplot data=SurvPlot;
series x=Time y=__Log_Survival__ / group=Stratum;
run;

 

Natacha
Calcite | Level 5

It worked! Thanks for the fast answer Rick 🙂 

SAS Innovate 2025: Call for Content

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 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 1794 views
  • 0 likes
  • 3 in conversation