- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi everyone, hopefully someone can help me out with this puzzle.
I'm using a Proc Lifetest with the following setup:
proc lifetest data =getdata(where=(aval^=.)) timelist = (3 6 9 12 18) alpha = 0.05; time aval * CNSR(1); by TRTGRPN; survival out = atrisk conftype = loglog reduceout; run;
For whatever reason the number of survivors at each timepoint from the list (the LEFT column) is being suppressed, even though NOLEFT option is not specified. I'm confused why this is happening, since the survival % is calculated just fine.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
If you can see it in the ODS output, use this method to capture that table:
https://blogs.sas.com/content/iml/2017/01/09/ods-output-any-statistic.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Which output, the displayed output or a table?
Your code appears to have some syntax errors, survival isn't a valid statement.
survival out = atrisk conftype = loglog reduceout;
Can you post the log?
Documentation for lifetest:
https://documentation.sas.com/doc/en/statug/15.2/statug_lifetest_syntax.htm
@SSimonov wrote:
Hi everyone, hopefully someone can help me out with this puzzle.
I'm using a Proc Lifetest with the following setup:
proc lifetest data =getdata(where=(aval^=.)) timelist = (3 6 9 12 18) alpha = 0.05; time aval * CNSR(1); by TRTGRPN; survival out = atrisk conftype = loglog reduceout; run;For whatever reason the number of survivors at each timepoint from the list (the LEFT column) is being suppressed, even though NOLEFT option is not specified. I'm confused why this is happening, since the survival % is calculated just fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
The Survival statement is what was left by previous programmer, the idea behind it's use is unclear to me.
Here's the log after the procedure's execution:
2023 +proc lifetest data =getdata(where=(aval^=.)) timelist = (3 6 9 12 18) alpha = 0.05;
MPRINT(SCSM): proc lifetest data =getdata(where=(aval^=.)) timelist = (3 6 9 12 18) alpha = 0.05;
2024 + time aval * CNSR(1);
MPRINT(SCSM): time aval * CNSR(1);
2025 + by TRTGRPN;
MPRINT(SCSM): by TRTGRPN;
2026 + survival out = atrisk conftype = loglog reduceout;
MPRINT(SCSM): survival out = atrisk conftype = loglog reduceout;
2027 +run;
MPRINT(SCSM): run;
NOTE: The data set WORK.ATRISK has 35 observations and 8 variables.
NOTE: The PROCEDURE LIFETEST printed pages 26-32.
The ODS output contains Left and Failed numbers, but I need them in the dataset.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
If you can see it in the ODS output, use this method to capture that table:
https://blogs.sas.com/content/iml/2017/01/09/ods-output-any-statistic.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@Reeza wrote:
Interesting, probably a leftover from an older version of SAS.
Exactly. The SURVIVAL statement appears to have been introduced in SAS 9.0 (cf. SAS/STAT® 9.1 User’s Guide linked in SAS 9.1.3 Documentation), but in version 9.2 its options were moved to the PROC LIFETEST statement (with OUT= renamed to OUTSURV=, alias: OUTS=), of course leaving the old statement valid. This change, although 15 years old, is still mentioned even in the latest SAS Viya documentation (see penultimate paragraph of Overview: LIFETEST Procedure).
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Totally forgot about this and it worked perfectly.
Thank you.