<?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 Class Statement: Calculating Hazard ratio using PROC PHREG in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Class-Statement-Calculating-Hazard-ratio-using-PROC-PHREG/m-p/809884#M319403</link>
    <description>&lt;P&gt;Hi, I am trying to calculate the Hazard ratio from the dataset using PROC PHREG.&lt;/P&gt;
&lt;P&gt;The data have 3 treatment groups&amp;nbsp;&lt;/P&gt;
&lt;P&gt;trtc&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;trtn&lt;/P&gt;
&lt;P&gt;Trt1&amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/P&gt;
&lt;P&gt;Trt2&amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;/P&gt;
&lt;P&gt;Trt3&amp;nbsp; &amp;nbsp; &amp;nbsp; 2&lt;/P&gt;
&lt;P&gt;I am running following the code, But I would like to know what each procure results represents&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;*********************************************&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Code 1:&lt;BR /&gt;proc phreg data=treat;&lt;BR /&gt;model aval*cnsr(1)= trtn/ rl alpha = 0.05 ;&lt;BR /&gt;ods output ParameterEstimates = hzratio ;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;This code generates one Hazarad ratio and other stats: Is this represents overall HAZARD Ratio?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;***********************************************&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Code 2:&lt;BR /&gt;proc phreg data=treat;&lt;BR /&gt;&lt;FONT face="arial black,avant garde" color="#FF0000"&gt;class trtn(ref="0");&lt;/FONT&gt;&lt;BR /&gt;model aval*cnsr(1)= trtn/ rl alpha = 0.05 ;&lt;BR /&gt;ods output ParameterEstimates = class_hratio ;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;it generates two Hazard ratios: each one&amp;nbsp; represents hazard ratios in comparison/reference to Trt1 ( trtn=0)?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;***************************************************&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Please let me know your thoughts thanks.&lt;/P&gt;</description>
    <pubDate>Tue, 26 Apr 2022 14:31:23 GMT</pubDate>
    <dc:creator>SASuserlot</dc:creator>
    <dc:date>2022-04-26T14:31:23Z</dc:date>
    <item>
      <title>Class Statement: Calculating Hazard ratio using PROC PHREG</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Class-Statement-Calculating-Hazard-ratio-using-PROC-PHREG/m-p/809884#M319403</link>
      <description>&lt;P&gt;Hi, I am trying to calculate the Hazard ratio from the dataset using PROC PHREG.&lt;/P&gt;
&lt;P&gt;The data have 3 treatment groups&amp;nbsp;&lt;/P&gt;
&lt;P&gt;trtc&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;trtn&lt;/P&gt;
&lt;P&gt;Trt1&amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/P&gt;
&lt;P&gt;Trt2&amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;/P&gt;
&lt;P&gt;Trt3&amp;nbsp; &amp;nbsp; &amp;nbsp; 2&lt;/P&gt;
&lt;P&gt;I am running following the code, But I would like to know what each procure results represents&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;*********************************************&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Code 1:&lt;BR /&gt;proc phreg data=treat;&lt;BR /&gt;model aval*cnsr(1)= trtn/ rl alpha = 0.05 ;&lt;BR /&gt;ods output ParameterEstimates = hzratio ;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;This code generates one Hazarad ratio and other stats: Is this represents overall HAZARD Ratio?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;***********************************************&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Code 2:&lt;BR /&gt;proc phreg data=treat;&lt;BR /&gt;&lt;FONT face="arial black,avant garde" color="#FF0000"&gt;class trtn(ref="0");&lt;/FONT&gt;&lt;BR /&gt;model aval*cnsr(1)= trtn/ rl alpha = 0.05 ;&lt;BR /&gt;ods output ParameterEstimates = class_hratio ;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;it generates two Hazard ratios: each one&amp;nbsp; represents hazard ratios in comparison/reference to Trt1 ( trtn=0)?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;***************************************************&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Please let me know your thoughts thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2022 14:31:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Class-Statement-Calculating-Hazard-ratio-using-PROC-PHREG/m-p/809884#M319403</guid>
      <dc:creator>SASuserlot</dc:creator>
      <dc:date>2022-04-26T14:31:23Z</dc:date>
    </item>
    <item>
      <title>Re: Class Statement: Calculating Hazard ratio using PROC PHREG</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Class-Statement-Calculating-Hazard-ratio-using-PROC-PHREG/m-p/809946#M319422</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/350312"&gt;@SASuserlot&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your "Code 2" is the correct approach. As you wrote, it computes the hazard ratios "Trt2 vs. Trt1" and "Trt3 vs. Trt1."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Without the CLASS statement ("Code 1"), variable TRTN is treated as a &lt;EM&gt;continuous&lt;/EM&gt; explanatory variable, which would hardly ever make sense. The single hazard ratio calculated describes the&amp;nbsp;&lt;SPAN&gt;change in the hazard for any increase of one "unit" of TRTN. But even if there was a continuous factor&amp;nbsp;&lt;SPAN&gt;underlying the treatment groups -- e.g., the dose of the same drug: Trt1=10 mg, Trt2=20 mg, Trt3=30 mg --, would you really want to assume that an increase from 10 to 20 mg has the same effect on survival as an&amp;nbsp;increase from 20 to 30 mg?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt; With only &lt;EM&gt;two&lt;/EM&gt; treatment groups (TRTN=0, TRTN=1) the two approaches would be equivalent, though.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2022 18:25:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Class-Statement-Calculating-Hazard-ratio-using-PROC-PHREG/m-p/809946#M319422</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2022-04-26T18:25:17Z</dc:date>
    </item>
  </channel>
</rss>

