<?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 How to calcuate the cumulative incidence and the survival probability in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-calcuate-the-cumulative-incidence-and-the-survival/m-p/308668#M66262</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I was wondering whether someone could help me with the SAS code to directly compute the cumulative incidence and survival probability (over the course of follow-up)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc phreg data=have;&lt;BR /&gt;class X;&lt;BR /&gt;model time*Y(0) = X;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;(X is binary)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way that SAS could directly output/compute the cumulative incidence of X. I know that survival probability = 1 - cumulative incidence but I am not sure how to readily get it from SAS.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
    <pubDate>Wed, 02 Nov 2016 05:12:38 GMT</pubDate>
    <dc:creator>SimRock</dc:creator>
    <dc:date>2016-11-02T05:12:38Z</dc:date>
    <item>
      <title>How to calcuate the cumulative incidence and the survival probability</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-calcuate-the-cumulative-incidence-and-the-survival/m-p/308668#M66262</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I was wondering whether someone could help me with the SAS code to directly compute the cumulative incidence and survival probability (over the course of follow-up)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc phreg data=have;&lt;BR /&gt;class X;&lt;BR /&gt;model time*Y(0) = X;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;(X is binary)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way that SAS could directly output/compute the cumulative incidence of X. I know that survival probability = 1 - cumulative incidence but I am not sure how to readily get it from SAS.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2016 05:12:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-calcuate-the-cumulative-incidence-and-the-survival/m-p/308668#M66262</guid>
      <dc:creator>SimRock</dc:creator>
      <dc:date>2016-11-02T05:12:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to calcuate the cumulative incidence and the survival probability</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-calcuate-the-cumulative-incidence-and-the-survival/m-p/308670#M66263</link>
      <description>&lt;P&gt;Are you sure you want proc phreg and not proc lifetest?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Perhaps with the failure plot? Or outcif?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2016 05:19:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-calcuate-the-cumulative-incidence-and-the-survival/m-p/308670#M66263</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-11-02T05:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to calcuate the cumulative incidence and the survival probability</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-calcuate-the-cumulative-incidence-and-the-survival/m-p/308672#M66264</link>
      <description>I will take anything that can compute it for me. Thank you for you prompt reply. I do not know how to get it in proc lifetest or the other procedures you mentioned. Could you share some codes with me</description>
      <pubDate>Wed, 02 Nov 2016 05:21:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-calcuate-the-cumulative-incidence-and-the-survival/m-p/308672#M66264</guid>
      <dc:creator>SimRock</dc:creator>
      <dc:date>2016-11-02T05:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to calcuate the cumulative incidence and the survival probability</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-calcuate-the-cumulative-incidence-and-the-survival/m-p/308673#M66265</link>
      <description>&lt;P&gt;Sure. This will generate three datasets that will have various calculations. You can use any of the three to get the numbers you desire. You may have to do some calculations to get it exactly the way you want it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc lifetest data=Males  method=lt intervals=(0 to 15 by 1)
              plots=(survival(f)) outsurv=survival_data;
   time Years*Censored(1);
   freq Freq;
   ods output failureplot=option1 LifetableEstimates=option2;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 02 Nov 2016 05:36:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-calcuate-the-cumulative-incidence-and-the-survival/m-p/308673#M66265</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-11-02T05:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to calcuate the cumulative incidence and the survival probability</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-calcuate-the-cumulative-incidence-and-the-survival/m-p/308675#M66266</link>
      <description>Thank you. The freq Freq does not seem to work on my SAS 9.4. It says variable FREQ not found.&lt;BR /&gt;Also, do you know how to output the confidence interval as well. Thank you so mcuh</description>
      <pubDate>Wed, 02 Nov 2016 05:49:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-calcuate-the-cumulative-incidence-and-the-survival/m-p/308675#M66266</guid>
      <dc:creator>SimRock</dc:creator>
      <dc:date>2016-11-02T05:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to calcuate the cumulative incidence and the survival probability</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-calcuate-the-cumulative-incidence-and-the-survival/m-p/308676#M66267</link>
      <description>&lt;P&gt;You only need freq if each value represents multiple records. The MALES dataset is available in the documentation for PROC LIFETEST under examples. Check the outputs. One of the datasets has CI but again you may need to 1- survival CI to get the values you want.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2016 05:55:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-calcuate-the-cumulative-incidence-and-the-survival/m-p/308676#M66267</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-11-02T05:55:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to calcuate the cumulative incidence and the survival probability</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-calcuate-the-cumulative-incidence-and-the-survival/m-p/308680#M66269</link>
      <description>&lt;P&gt;Okay. thank you. Got it.&lt;/P&gt;&lt;P&gt;Now my other problem is that it does not give me the expected results when I calulate it by.&lt;/P&gt;&lt;P&gt;I have 9 time points, 53026 events and 98230 individuals. There are no lost-to followup or competing risks. I have attached a snapshot of my data. When I calculate it manually, I get Survival =.0.46 and cumulative incidence=0.54 (i.e. 53026/98230) but when I use proc lifetest I get Survival=0.48 and cumulative incidence=0.52. I am just wondering whether I am making a mistake in my SAS code.&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13101i5FE79A47681FAA8C/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="Capture.JPG" title="Capture.JPG" /&gt;</description>
      <pubDate>Wed, 02 Nov 2016 06:25:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-calcuate-the-cumulative-incidence-and-the-survival/m-p/308680#M66269</guid>
      <dc:creator>SimRock</dc:creator>
      <dc:date>2016-11-02T06:25:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to calcuate the cumulative incidence and the survival probability</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-calcuate-the-cumulative-incidence-and-the-survival/m-p/308684#M66272</link>
      <description>&lt;P&gt;Examine the METHODS option. There are several methods for doing calculations.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You have a lot of observations but only 9 time points, or 9 points of interest.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2016 06:50:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-calcuate-the-cumulative-incidence-and-the-survival/m-p/308684#M66272</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-11-02T06:50:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to calcuate the cumulative incidence and the survival probability</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-calcuate-the-cumulative-incidence-and-the-survival/m-p/308688#M66273</link>
      <description>Thank you. I will try it out and see.&lt;BR /&gt;Best&lt;BR /&gt;Thanks for your help</description>
      <pubDate>Wed, 02 Nov 2016 07:18:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-calcuate-the-cumulative-incidence-and-the-survival/m-p/308688#M66273</guid>
      <dc:creator>SimRock</dc:creator>
      <dc:date>2016-11-02T07:18:06Z</dc:date>
    </item>
  </channel>
</rss>

