- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi sas users!
I have a question regarding survival analysis.
I am working on the effect of lymphocyte/monocye ratio (which is a binary factor >2 vs <2) on the progression free survival.
I would like to plot this effect within each treatment arm (2 arms) and to use the approprial statistic test?
So far, i have created a categorical, variable "d_groupe" as follow:
0= lmr<2 and treatment arm=1
1=lmr<2 and treatment arm=2
2=lmr>2 and treatment arm=1
3=lmr>2 and treatment arm=2
Then i used proc lifetest to generate the graph:
ODS GRAPHICS ON;
PROC LIFETEST DATA=data plots=survival(cl test nocensor atrisk(outside));
TIME D_TIME_PFS_IRC_EMA*D_CENS_PFS_IRC_EMA(1);
STRATA d_groupe;
RUN;
ODS GRAPHICS OFF;
Is it the correct way to do it and which statistical test is needed?
Thank you in advance for your help
Romain
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@Romain69100 wrote:
Thank you for your answer.
Graphically i would like to have a red solid line for the "0" group and a blue solid line for the "1" group and a red dotted line for the "2" group and and a blue dotted line for the "3" group?
Do you know how to compute this?
Thanks again
My generic suggestion for any appearance controls is to extract data from the procedure, modify if needed and use a graphing procedure such as Sgplot to create the graphs. Most of the graphs from analysis procedures are in the nature of exploratory and not designed to create presentation or publication ready graphs. I consider requests for specific colors, line types, axis labels, fonts etc. as "presentation" requirements so the suggestion.
These would be Styleattrs statements as overrides to existing ODS Style defaults or potentially Dattrmap options for Sgplot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
you can try wilcoxon or log-rank assuming assumptions are met. these are nonparametric tests.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your answer.
Graphically i would like to have a red solid line for the "0" group and a blue solid line for the "1" group and a red dotted line for the "2" group and and a blue dotted line for the "3" group?
Do you know how to compute this?
Thanks again
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@Romain69100 wrote:
Thank you for your answer.
Graphically i would like to have a red solid line for the "0" group and a blue solid line for the "1" group and a red dotted line for the "2" group and and a blue dotted line for the "3" group?
Do you know how to compute this?
Thanks again
My generic suggestion for any appearance controls is to extract data from the procedure, modify if needed and use a graphing procedure such as Sgplot to create the graphs. Most of the graphs from analysis procedures are in the nature of exploratory and not designed to create presentation or publication ready graphs. I consider requests for specific colors, line types, axis labels, fonts etc. as "presentation" requirements so the suggestion.
These would be Styleattrs statements as overrides to existing ODS Style defaults or potentially Dattrmap options for Sgplot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello @Romain69100,
In the special case of Kaplan-Meier plots there are ample possibilities for customization thanks to the macros SAS provided in Customizing the Kaplan-Meier Survival Plot (direct link to the code: https://support.sas.com/documentation/onlinedoc/stat/ex_code/151/templft.html).
You can specify the colors and line patterns as you want in macro variable GraphOpts, as shown in the example below.
/* Create sample data for demonstration */
data have;
set VALung; /* from https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/statug/statug_lifetest_examples01.htm */
d_groupe=mod(rank(char(cell,4))+2,4);
run;
/* Specify colors and line patterns */
%ProvideSurvivalMacros /* from https://support.sas.com/documentation/onlinedoc/stat/ex_code/151/templft.html */
%let GraphOpts = attrpriority=none
DataContrastColors = (red blue red blue)
DataLinePatterns = (solid solid dot dot );
%CompileSurvivalTemplates
/* Apply the attributes to a Kaplan-Meier plot */
ods graphics on;
proc lifetest data=have plots=(s);
time SurvTime*Censor(1);
strata d_groupe;
run;
ods graphics off;