Obsidian | Level 7

## Kaplan-Meier Lifetable Incorrect

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

## Re: Kaplan-Meier Lifetable Incorrect

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:

1. Those who are alive and not censored are at risk with respect to all three outcomes, whereas
2. 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

## Re: Kaplan-Meier Lifetable Incorrect

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:

1. Those who are alive and not censored are at risk with respect to all three outcomes, whereas
2. 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.

Obsidian | Level 7

## Re: Kaplan-Meier Lifetable Incorrect

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

## Re: Kaplan-Meier Lifetable Incorrect

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.

Obsidian | Level 7

## Re: Kaplan-Meier Lifetable Incorrect

Thank you so much, @FreelancdReinh!
You've really helped me to understand the concepts here.
Sophie
Discussion stats
• 4 replies
• 455 views
• 2 likes
• 2 in conversation