<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Kaplan-Meier Lifetable Incorrect in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Kaplan-Meier-Lifetable-Incorrect/m-p/884930#M349624</link>
    <description>&lt;P&gt;You're welcome.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would say that the population at risk &lt;EM&gt;is&lt;/EM&gt; the correct one for &lt;EM&gt;each&lt;/EM&gt; 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 &lt;EM&gt;first&lt;/EM&gt; such event is the outcome of interest).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The description "0=&lt;EM&gt;alive&lt;/EM&gt;" 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 "&lt;EM&gt;censored&lt;/EM&gt;."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As you wrote yesterday, the Kaplan-Meier curves for the three outcomes "&lt;SPAN&gt;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.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 16 Jul 2023 11:37:56 GMT</pubDate>
    <dc:creator>FreelanceReinh</dc:creator>
    <dc:date>2023-07-16T11:37:56Z</dc:date>
    <item>
      <title>Kaplan-Meier Lifetable Incorrect</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Kaplan-Meier-Lifetable-Incorrect/m-p/884910#M349606</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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...&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this case my "death" variable is 0=alive, 1=deceased.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Sophie&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the table I get with each outcome:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sophiec_1-1689438281734.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/85804i1E7DC391C9560D29/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sophiec_1-1689438281734.png" alt="sophiec_1-1689438281734.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc lifetest data=working plots=survival(test atrisk(maxlen=50 outside) nocensor); 
strata rankvar / order=internal test=(logrank); 
time length_yr*death(0); 
run; &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jul 2023 16:24:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Kaplan-Meier-Lifetable-Incorrect/m-p/884910#M349606</guid>
      <dc:creator>sophiec</dc:creator>
      <dc:date>2023-07-15T16:24:52Z</dc:date>
    </item>
    <item>
      <title>Re: Kaplan-Meier Lifetable Incorrect</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Kaplan-Meier-Lifetable-Incorrect/m-p/884915#M349611</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/441111"&gt;@sophiec&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Those who are alive and not censored are at risk with respect to &lt;EM&gt;all three &lt;/EM&gt;outcomes, whereas&lt;/LI&gt;
&lt;LI&gt;those who died or were censored before are &lt;EM&gt;not&lt;/EM&gt; at risk with respect to &lt;EM&gt;any of the&amp;nbsp;three &lt;/EM&gt;outcomes.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Hence, the numbers &lt;EM&gt;must&lt;/EM&gt; be identical.&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jul 2023 17:31:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Kaplan-Meier-Lifetable-Incorrect/m-p/884915#M349611</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2023-07-15T17:31:57Z</dc:date>
    </item>
    <item>
      <title>Re: Kaplan-Meier Lifetable Incorrect</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Kaplan-Meier-Lifetable-Incorrect/m-p/884929#M349623</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/32733"&gt;@FreelanceReinh&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much for the explanation! It makes a lot more sense to me now and I appreciate the thorough explanation.&amp;nbsp;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.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- I started with a categorical variable listing 5+ causes of death.&amp;nbsp;&lt;/P&gt;&lt;P&gt;- I then created 3 dummy variables coded as 0=alive and 1=event occurred: all-cause, cardiovascular mortality, and non-cardiovascular mortality.&amp;nbsp;&lt;/P&gt;&lt;P&gt;- I used the dummy variables in the proc lifetest command (where "death" was included in the example I provided previously)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you again for your thoughtful and patient response!&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sophie&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 16 Jul 2023 09:50:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Kaplan-Meier-Lifetable-Incorrect/m-p/884929#M349623</guid>
      <dc:creator>sophiec</dc:creator>
      <dc:date>2023-07-16T09:50:59Z</dc:date>
    </item>
    <item>
      <title>Re: Kaplan-Meier Lifetable Incorrect</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Kaplan-Meier-Lifetable-Incorrect/m-p/884930#M349624</link>
      <description>&lt;P&gt;You're welcome.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would say that the population at risk &lt;EM&gt;is&lt;/EM&gt; the correct one for &lt;EM&gt;each&lt;/EM&gt; 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 &lt;EM&gt;first&lt;/EM&gt; such event is the outcome of interest).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The description "0=&lt;EM&gt;alive&lt;/EM&gt;" 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 "&lt;EM&gt;censored&lt;/EM&gt;."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As you wrote yesterday, the Kaplan-Meier curves for the three outcomes "&lt;SPAN&gt;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.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 16 Jul 2023 11:37:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Kaplan-Meier-Lifetable-Incorrect/m-p/884930#M349624</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2023-07-16T11:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: Kaplan-Meier Lifetable Incorrect</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Kaplan-Meier-Lifetable-Incorrect/m-p/884932#M349626</link>
      <description>Thank you so much, @FreelancdReinh!&lt;BR /&gt;You've really helped me to understand the concepts here.&lt;BR /&gt;Sophie</description>
      <pubDate>Sun, 16 Jul 2023 15:11:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Kaplan-Meier-Lifetable-Incorrect/m-p/884932#M349626</guid>
      <dc:creator>sophiec</dc:creator>
      <dc:date>2023-07-16T15:11:20Z</dc:date>
    </item>
  </channel>
</rss>

