Programming the statistical procedures from SAS

Proc lifetest

Accepted Solution Solved
Reply
New Contributor
Posts: 3
Accepted Solution

Proc lifetest

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 Smiley Happy 

 

 


Accepted Solutions
Solution
‎03-17-2017 10:03 AM
SAS Super FREQ
Posts: 3,310

Re: Proc lifetest

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


All Replies
Grand Advisor
Posts: 16,907

Re: Proc lifetest

Post your code and a copy of the image please. 

New Contributor
Posts: 3

Re: Proc lifetest

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. -##
Solution
‎03-17-2017 10:03 AM
SAS Super FREQ
Posts: 3,310

Re: Proc lifetest

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;

 

New Contributor
Posts: 3

Re: Proc lifetest

It worked! Thanks for the fast answer Rick Smiley Happy 

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

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