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.
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.
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.
@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).
Totally forgot about this and it worked perfectly.
Thank you.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.