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
- /
- Programming
- /
- Re: Kaplan-Meier Lifetable Incorrect

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 07-15-2023 12:24 PM
(482 views)

Hello,

I have plotted survival curves for three outcomes (cardiovascular mortality, non-cardiovascular mortality, and all-cause mortality) and a continuous variable that has been split into tertiles ("rankvar"). However, I noticed that the lifetable of number at risk is identical for each of the outcomes. Can you help me understand what went wrong here? The curves appear very different so it seems that the analysis started out correctly...

In this case my "death" variable is 0=alive, 1=deceased.

Thanks!

Sophie

Here is the table I get with each outcome:

proc lifetest data=working plots=survival(test atrisk(maxlen=50 outside) nocensor); strata rankvar / order=internal test=(logrank); time length_yr*death(0); run;

1 ACCEPTED SOLUTION

Accepted Solutions

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

Hello @sophiec,

Good news! I think nothing went wrong here. A patient can die only once, either from a cardiovascular event or from a non-cardiovascular event. So, at any point in time:

- Those who are alive and not censored are at risk with respect to
*all three*outcomes, whereas - those who died or were censored before are
*not*at risk with respect to*any of the three*outcomes.

Hence, the numbers *must* be identical.

4 REPLIES 4

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

Hello @sophiec,

Good news! I think nothing went wrong here. A patient can die only once, either from a cardiovascular event or from a non-cardiovascular event. So, at any point in time:

- Those who are alive and not censored are at risk with respect to
*all three*outcomes, whereas - those who died or were censored before are
*not*at risk with respect to*any of the three*outcomes.

Hence, the numbers *must* be identical.

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

Thank you so much for the explanation! It makes a lot more sense to me now and I appreciate the thorough explanation. Because I'm still quite new at these analyses, I would like to make sure that my coding of the outcome variables wouldn't impact the interpretation of the lifetable.

- I started with a categorical variable listing 5+ causes of death.

- I then created 3 dummy variables coded as 0=alive and 1=event occurred: all-cause, cardiovascular mortality, and non-cardiovascular mortality.

- I used the dummy variables in the proc lifetest command (where "death" was included in the example I provided previously)

If I'm understanding correctly, the lifetable provides the population at risk regardless of cause of death, meaning that it does not specifically relate to the dummy variable used in the proc lifetest command. Is that correct, or have I bungled something in creating these dummy variables?

Thank you again for your thoughtful and patient response!

Sophie

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

You're welcome.

I would say that the population at risk *is* the correct one for *each* of the three outcomes. It's just in the nature of these particular outcomes that the populations are identical. The situation would be different if non-fatal events were among the outcomes. For example, a patient who experienced a transient ischemic attack (TIA; hypothetical "outcome 1") would still be at risk for myocardial infarction (outcome 2) and death (outcome 3), i.e., they would drop out of only one of the three risk sets due to the TIA (assuming that the *first* such event is the outcome of interest).

The description "0=*alive*" might be misleading, though. For a patient who died from a non-cardiovascular disease such as cancer, the value 0 of the dummy variable associated with cardiovascular mortality must be interpreted as "*censored*."

As you wrote yesterday, the Kaplan-Meier curves for the three outcomes "appear very different," which (in conjunction with the strata differences) is the important result, not the three populations at risk being identical at each point in time for logical reasons.

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

Thank you so much, @FreelancdReinh!

You've really helped me to understand the concepts here.

Sophie

You've really helped me to understand the concepts here.

Sophie

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. **Registration is now open through August 30th**. Visit the SAS Hackathon homepage.

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.