<?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: log-rank test for survival curves in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/log-rank-test-for-survival-curves/m-p/929709#M46328</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/349295"&gt;@tinghlin&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/349295"&gt;@tinghlin&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;1) did i enter the data correctly?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You can work with the data as shown, but it is more common to store character values without enclosing quotation marks:&lt;/P&gt;
&lt;PRE&gt;data have;
input age $ time;
cards;
&amp;lt;=40 2
&amp;lt;=40 3
...&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;
&lt;P&gt;2)&amp;nbsp; how do i conduct a&amp;nbsp;log-rank test to compare survival curves between 2 age groups?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This is typically done with&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/statug/statug_lifetest_toc.htm" target="_blank" rel="noopener"&gt;PROC LIFETEST&lt;/A&gt;. In the absence of censored observations (as in your example) this step looks like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc lifetest data=have;
time time;
strata age;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;where you would replace "&lt;FONT face="courier new,courier"&gt;have&lt;/FONT&gt;" with the name of your input dataset containing variables &lt;FONT face="courier new,courier"&gt;time&lt;/FONT&gt; and &lt;FONT face="courier new,courier"&gt;age&lt;/FONT&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You find the result under "Test of Equality over Strata" in the PROC LIFETEST output:&lt;/P&gt;
&lt;PRE&gt;       Test of Equality over Strata

                                   Pr &amp;gt;
Test      Chi-Square      DF    Chi-Square

&lt;STRONG&gt;Log-Rank      6.1690       1      0.0130&lt;/STRONG&gt;
Wilcoxon      7.8000       1      0.0052
-2Log(LR)     5.4753       1      0.0193
&lt;/PRE&gt;
&lt;P&gt;So the log-rank test detects a significant difference between the survival curves of the two age groups (assuming a significance level &lt;FONT face="symbol"&gt;a&lt;/FONT&gt;=0.05).&lt;/P&gt;</description>
    <pubDate>Sun, 26 May 2024 10:41:48 GMT</pubDate>
    <dc:creator>FreelanceReinh</dc:creator>
    <dc:date>2024-05-26T10:41:48Z</dc:date>
    <item>
      <title>log-rank test for survival curves</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/log-rank-test-for-survival-curves/m-p/929672#M46323</link>
      <description>&lt;P&gt;i have a data s follows: there are only 2 variables, age group (age) and survival time (time). there is no censoring observations.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;input age $ time ;&lt;BR /&gt;cards;&lt;BR /&gt;"&amp;lt;=40" 2&lt;BR /&gt;"&amp;lt;=40" 3&lt;BR /&gt;"&amp;lt;=40" 6&lt;BR /&gt;"&amp;lt;=40" 6&lt;BR /&gt;"&amp;lt;=40" 7&lt;BR /&gt;"&amp;lt;=40" 10&lt;BR /&gt;"&amp;lt;=40" 15&lt;BR /&gt;"&amp;lt;=40" 15&lt;BR /&gt;"&amp;lt;=40" 16&lt;BR /&gt;"&amp;lt;=40" 27&lt;BR /&gt;"&amp;lt;=40" 30&lt;BR /&gt;"&amp;lt;=40" 32&lt;BR /&gt;"&amp;gt;40" 1&lt;BR /&gt;"&amp;gt;40" 1&lt;BR /&gt;"&amp;gt;40" 1&lt;BR /&gt;"&amp;gt;40" 1&lt;BR /&gt;"&amp;gt;40" 2&lt;BR /&gt;"&amp;gt;40" 3&lt;BR /&gt;"&amp;gt;40" 3&lt;BR /&gt;"&amp;gt;40" 9&lt;BR /&gt;"&amp;gt;40" 22&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have two questions:&lt;/P&gt;&lt;P&gt;1) did i enter the data correctly?&lt;/P&gt;&lt;P&gt;2)&amp;nbsp; how do i conduct a&amp;nbsp;log-rank test to compare survival curves between 2 age groups?&lt;/P&gt;</description>
      <pubDate>Sat, 25 May 2024 14:09:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/log-rank-test-for-survival-curves/m-p/929672#M46323</guid>
      <dc:creator>tinghlin</dc:creator>
      <dc:date>2024-05-25T14:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: log-rank test for survival curves</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/log-rank-test-for-survival-curves/m-p/929709#M46328</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/349295"&gt;@tinghlin&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/349295"&gt;@tinghlin&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;1) did i enter the data correctly?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You can work with the data as shown, but it is more common to store character values without enclosing quotation marks:&lt;/P&gt;
&lt;PRE&gt;data have;
input age $ time;
cards;
&amp;lt;=40 2
&amp;lt;=40 3
...&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;
&lt;P&gt;2)&amp;nbsp; how do i conduct a&amp;nbsp;log-rank test to compare survival curves between 2 age groups?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This is typically done with&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/statug/statug_lifetest_toc.htm" target="_blank" rel="noopener"&gt;PROC LIFETEST&lt;/A&gt;. In the absence of censored observations (as in your example) this step looks like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc lifetest data=have;
time time;
strata age;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;where you would replace "&lt;FONT face="courier new,courier"&gt;have&lt;/FONT&gt;" with the name of your input dataset containing variables &lt;FONT face="courier new,courier"&gt;time&lt;/FONT&gt; and &lt;FONT face="courier new,courier"&gt;age&lt;/FONT&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You find the result under "Test of Equality over Strata" in the PROC LIFETEST output:&lt;/P&gt;
&lt;PRE&gt;       Test of Equality over Strata

                                   Pr &amp;gt;
Test      Chi-Square      DF    Chi-Square

&lt;STRONG&gt;Log-Rank      6.1690       1      0.0130&lt;/STRONG&gt;
Wilcoxon      7.8000       1      0.0052
-2Log(LR)     5.4753       1      0.0193
&lt;/PRE&gt;
&lt;P&gt;So the log-rank test detects a significant difference between the survival curves of the two age groups (assuming a significance level &lt;FONT face="symbol"&gt;a&lt;/FONT&gt;=0.05).&lt;/P&gt;</description>
      <pubDate>Sun, 26 May 2024 10:41:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/log-rank-test-for-survival-curves/m-p/929709#M46328</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2024-05-26T10:41:48Z</dc:date>
    </item>
  </channel>
</rss>

