<?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: Proc Phreg for time varying exposure variable- different output in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Phreg-for-time-varying-exposure-variable-different-output/m-p/899060#M44546</link>
    <description>&lt;P&gt;I think you should go with the start, stop counting-process syntax.&amp;nbsp; &amp;nbsp;Your data are already in that form.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 18 Oct 2023 05:36:15 GMT</pubDate>
    <dc:creator>OsoGris</dc:creator>
    <dc:date>2023-10-18T05:36:15Z</dc:date>
    <item>
      <title>Proc Phreg for time varying exposure variable- different output</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Phreg-for-time-varying-exposure-variable-different-output/m-p/899053#M44545</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;My data set looks like:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;ID&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;event&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Met_01&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Start (days)&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Stop (days)&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Fu_time (stop-start)&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;0&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;0&lt;/P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lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;365&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;790&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;425&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I am applying time varying Cox regression in SAS using following 2 codes then I am getting completely different Hazard Ratio (model 1: crude HR 0.95 and model 2:crude HR 0.74).&lt;/P&gt;&lt;P&gt;Model 1:&lt;/P&gt;&lt;P&gt;proc phreg data=test;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; class met_01/ref=first;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; model (&lt;STRONG&gt;start, stop&lt;/STRONG&gt;) * event (0) = met_01/ties=EFRON RL;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;Model 2:&lt;/P&gt;&lt;P&gt;proc phreg data=test;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; class met_01/ref=first;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; model &lt;STRONG&gt;fu_time&lt;/STRONG&gt;* event (0) = met_01/ties=EFRON RL;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;I am not sure which one is to consider. Any help on this will be highly appreciated. I am struggling on this point from a long time.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2023 02:40:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Phreg-for-time-varying-exposure-variable-different-output/m-p/899053#M44545</guid>
      <dc:creator>Jas5</dc:creator>
      <dc:date>2023-10-18T02:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Phreg for time varying exposure variable- different output</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Phreg-for-time-varying-exposure-variable-different-output/m-p/899060#M44546</link>
      <description>&lt;P&gt;I think you should go with the start, stop counting-process syntax.&amp;nbsp; &amp;nbsp;Your data are already in that form.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2023 05:36:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Phreg-for-time-varying-exposure-variable-different-output/m-p/899060#M44546</guid>
      <dc:creator>OsoGris</dc:creator>
      <dc:date>2023-10-18T05:36:15Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Phreg for time varying exposure variable- different output</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Phreg-for-time-varying-exposure-variable-different-output/m-p/899329#M44570</link>
      <description>thanks!</description>
      <pubDate>Fri, 20 Oct 2023 01:49:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Phreg-for-time-varying-exposure-variable-different-output/m-p/899329#M44570</guid>
      <dc:creator>Jas5</dc:creator>
      <dc:date>2023-10-20T01:49:43Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Phreg for time varying exposure variable- different output</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Phreg-for-time-varying-exposure-variable-different-output/m-p/899582#M44600</link>
      <description>&lt;P&gt;Does anyone know what is the formulae that SAS used at the back end to output Hazard Ratio from these 2 models? Thanks.&lt;/P&gt;</description>
      <pubDate>Sun, 22 Oct 2023 23:40:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Phreg-for-time-varying-exposure-variable-different-output/m-p/899582#M44600</guid>
      <dc:creator>Jas5</dc:creator>
      <dc:date>2023-10-22T23:40:24Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Phreg for time varying exposure variable- different output</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Phreg-for-time-varying-exposure-variable-different-output/m-p/899933#M44621</link>
      <description>&lt;P&gt;Both can be correct, but most likely you should use (start, stop).&lt;/P&gt;
&lt;P&gt;It has to do with how you define the baseline hazard. If the baseline hazard should be a function of time since 0 then use (start, stop).&lt;/P&gt;
&lt;P&gt;If the hazard functions should be reset, such it is a functio of time since last stop time then you can use your model 2.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In far most cases, model 1 is the right way to go.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For your second question about how the hazard ratio is calculated, the simple answer is that it is the maximum point of the Cox's partial likelihood function. The hazard ratio has no closed analytical form. Except in simple cases with very few events. In your case the estimated hazard ratio is the maximum point of the function&amp;nbsp;(x/(1+2*x))*(1/(1+x)) which is sqrt(1/2). I dont get exactly same number as you mention btw, but I have tried run the SAS code and the solution is indeed sqrt(0.5)=0.707.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2023 11:57:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Phreg-for-time-varying-exposure-variable-different-output/m-p/899933#M44621</guid>
      <dc:creator>JacobSimonsen</dc:creator>
      <dc:date>2023-10-25T11:57:44Z</dc:date>
    </item>
  </channel>
</rss>

