<?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: Comparing 2 Kaplan-Meier estimates in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Comparing-2-Kaplan-Meier-estimates/m-p/172880#M8968</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you JacobSimonsen.&amp;nbsp; I was hoping SAS might have something available, but perhaps not. I currently do something similar to the approach you provided above (which is greatly appreciated, by the way) but a little different.&amp;nbsp; I get the 5-year survival estimates and corresponding standard error, based on the log-log transformation, for each group from the outsurv option in PROC LIFETEST.&amp;nbsp; Then conduct a simple z-test or build a confidence interval for the difference assuming a normal distribution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am replicating some results conducted by a previous statistician using the same data set.&amp;nbsp; Everything matches nicely but the CI I obtain is slightly different.&amp;nbsp; Given this, I started wondering if SAS had something more exact than the z-score method I am using.&amp;nbsp; I will try yours when I have time to see how well it matches.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Jan 2015 17:00:46 GMT</pubDate>
    <dc:creator>mostater</dc:creator>
    <dc:date>2015-01-08T17:00:46Z</dc:date>
    <item>
      <title>Comparing 2 Kaplan-Meier estimates</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Comparing-2-Kaplan-Meier-estimates/m-p/172878#M8966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there a SAS option to compare Kaplan-Meier estimates?&amp;nbsp; I have a strata variable defined at 2 levels and would like to compare the KM survival estimates at a specific time point (5 years, in my case), e.g. strata level 1 KM 5-year estimate vs. strata level 2 KM 5-year estimate.&amp;nbsp; Is it possible to do this in SAS PROC LIFETEST or elsewhere?&amp;nbsp; A p-value or, even better, the confidence interval of the difference would be great.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2015 16:08:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Comparing-2-Kaplan-Meier-estimates/m-p/172878#M8966</guid>
      <dc:creator>mostater</dc:creator>
      <dc:date>2015-01-07T16:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing 2 Kaplan-Meier estimates</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Comparing-2-Kaplan-Meier-estimates/m-p/172879#M8967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In case that you have no censoring, then the easiest way is to create a binary variale indicating whether or not the persone has event before the time of interest (t=5 in your case). Then make a logistic regression to see if there is association between this binary variable and your strata variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If there is censoring then it becomes more complicated. I dont think there is any procedure that can do it for you, so you have to construct the test yourself. I suggest to test the cumulated incidence functions eqaul at the t=5. This is equivalent to test equal KM-curves, but has better asymptotic behaviour. PHREG can give you the cumulated incidencefunctions as well as the standard-errors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data mydata;&lt;BR /&gt;&amp;nbsp; do strata=1 to 2;&lt;BR /&gt;&amp;nbsp; do i=1 to 10000;&lt;BR /&gt;&amp;nbsp; t=-10*log(ranuni(-1))/exp(0.0*(gruppe=2));&lt;BR /&gt;&amp;nbsp; output;&lt;BR /&gt;&amp;nbsp; end;&lt;BR /&gt;&amp;nbsp; end;&lt;BR /&gt;run;&lt;BR /&gt;proc phreg data=mydata;&lt;BR /&gt;&amp;nbsp; model t=;&lt;BR /&gt;&amp;nbsp; baseline out=survival loglogs=loglogsurv cif=cif stderr=stderr stdcif=stdcif cumhaz=cumhaz stdcumhaz=stdcumhaz;&lt;BR /&gt;&amp;nbsp; by strata;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data test;&lt;BR /&gt;&amp;nbsp; set survival(in=a where=(strata=1) rename=(cumhaz=cumhaz1 stdcumhaz=stdcumhaz1))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; survival(in=b where=(strata=2) rename=(cumhaz=cumhaz2 stdcumhaz=stdcumhaz2));&lt;BR /&gt;&amp;nbsp; by t;&lt;BR /&gt;&amp;nbsp; retain laststdcumhaz1-laststdcumhaz2 lastcumhaz1 lastcumhaz2;&lt;BR /&gt;&amp;nbsp; if a then do;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; stdcumhaz2=laststdcumhaz2;cumhaz2=lastcumhaz2;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; lastcumhaz1=cumhaz1; laststdcumhaz1=stdcumhaz1;&lt;BR /&gt;&amp;nbsp; end;&lt;BR /&gt;&amp;nbsp; else if b then do;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; stdcumhaz1=laststdcumhaz1;cumhaz1=lastcumhaz1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; lastcumhaz2=cumhaz2; laststdcumhaz2=stdcumhaz2;&lt;BR /&gt;&amp;nbsp; end;&lt;BR /&gt;&amp;nbsp; pointwise_zvalue=(cumhaz1-cumhaz2)/sqrt(stdcumhaz1**2+stdcumhaz2**2);&lt;BR /&gt;&amp;nbsp; format pointwise_pvalue 6.4;&lt;BR /&gt;&amp;nbsp; pointwise_pvalue=2*sdf('normal',abs(pointwise_zvalue));&lt;BR /&gt;&amp;nbsp; keep t cumhaz1 cumhaz2 stdcumhaz1-stdcumhaz2 pointwise_zvalue pointwise_pvalue;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;BR /&gt;symbol i=join v=none;&lt;BR /&gt;proc gplot data=test;&lt;BR /&gt;&amp;nbsp; plot pointwise_pvalue*t;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*test at t=5;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set test(where=(t&amp;lt;5)) end=end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; put pointwise_pvalue=;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2015 18:09:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Comparing-2-Kaplan-Meier-estimates/m-p/172879#M8967</guid>
      <dc:creator>JacobSimonsen</dc:creator>
      <dc:date>2015-01-07T18:09:24Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing 2 Kaplan-Meier estimates</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Comparing-2-Kaplan-Meier-estimates/m-p/172880#M8968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you JacobSimonsen.&amp;nbsp; I was hoping SAS might have something available, but perhaps not. I currently do something similar to the approach you provided above (which is greatly appreciated, by the way) but a little different.&amp;nbsp; I get the 5-year survival estimates and corresponding standard error, based on the log-log transformation, for each group from the outsurv option in PROC LIFETEST.&amp;nbsp; Then conduct a simple z-test or build a confidence interval for the difference assuming a normal distribution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am replicating some results conducted by a previous statistician using the same data set.&amp;nbsp; Everything matches nicely but the CI I obtain is slightly different.&amp;nbsp; Given this, I started wondering if SAS had something more exact than the z-score method I am using.&amp;nbsp; I will try yours when I have time to see how well it matches.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2015 17:00:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Comparing-2-Kaplan-Meier-estimates/m-p/172880#M8968</guid>
      <dc:creator>mostater</dc:creator>
      <dc:date>2015-01-08T17:00:46Z</dc:date>
    </item>
  </channel>
</rss>

