- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I have this section of a table which compares 2 drugs
and this piece of of code (AvalM is Aval transformed to months using this code avalM = aval / 365.25 * 12;)
ods results off;
ods output CensoredSummary=stat00 Quartiles=med00 homtests= logrank00;
PROC LIFETEST data = adtte00 METHOD = km CONFTYPE=LOGLOG plots=survival(atrisk=3 6 9 12 18 24) ;
TIME avalM * CNSR(1) ;
STRATA trtp;
by &Subgrp;
RUN;
ods results on;
Now I know there is an option in PROC LIFETEST for plots such as
plots=survival(atrisk= 0 to 2500 by 500)
Can something similar be done here just to get the results for each month specified and can the by statement be adjusted as the pattern is 3,6,9,12,18,24 so the first 4 are every 3 months but the rest are every 6 months. Any help would be greatly appreciated.
data have;
input SUBJID $ AVALM 8. CNSR;
infile datalines dlm = '|';
datalines;
1001|0.0328542094|0
1002|4.205338809 |1
1003|0.0328542094|0
;
run;
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
/*
That warning said you need OPEN " ODS graphics " by ods graphics;
And use ODS OUTPUT to save this graph into a dataset.
*/
ods graphics;
ods output SurvivalPlot= SurvivalPlot; /* <-- Here is */
PROC LIFETEST data = sashelp.bmt METHOD = km CONFTYPE=LOGLOG plots=survival(atrisk= 0 to 2500 by 500);
TIME t * Status(0) ;
STRATA Group;
RUN;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Can not list these months in PLOT ?
PROC LIFETEST data = adtte00 METHOD = km CONFTYPE=LOGLOG plots=survival(atrisk=3 6 9 12 18 24) ;
TIME t * Status(0) ;
STRATA Group;
RUN;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@Ksharp I get the warning and log notes below. Is there a way to just get the results in a data set as opposed to using ODS graphics or would this require additional steps?
"WARNING: ODS graphics must be enabled to obtain the full features of the PLOTS= option.
NOTE: 28503 bytes written to
/saswork/SAS_work8ED3000050D2_dsprgn05.ds-grid.com/SAS_workE693000050D2_dsprgn05.ds-grid.com/lifetest1.png.
NOTE: PROCEDURE LIFETEST used (Total process time):
real time 0.79 seconds
cpu time 0.74 seconds
NOTE: The above message was for the following BY group:
Full Analysis Set Population Flag=Y"
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
/*
That warning said you need OPEN " ODS graphics " by ods graphics;
And use ODS OUTPUT to save this graph into a dataset.
*/
ods graphics;
ods output SurvivalPlot= SurvivalPlot; /* <-- Here is */
PROC LIFETEST data = sashelp.bmt METHOD = km CONFTYPE=LOGLOG plots=survival(atrisk= 0 to 2500 by 500);
TIME t * Status(0) ;
STRATA Group;
RUN;