- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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 🙂
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I assume you are seeing graphs like in this documentation example:
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;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Post your code and a copy of the image please.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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. -##
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I assume you are seeing graphs like in this documentation example:
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;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
It worked! Thanks for the fast answer Rick 🙂