Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Home
- /
- Programming
- /
- SAS Procedures
- /
- proc lifetest output missing the LEFT column

Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

☑ This topic is **solved**.
Need further help from the community? Please
sign in and ask a **new** question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 08-17-2023 10:52 AM
(508 views)

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.

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Interesting, probably a leftover from an older version of SAS.

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

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

5 REPLIES 5

- 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.

**Don't miss out on SAS Innovate - Register now for the FREE Livestream!**

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

What is Bayesian Analysis?

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.