<?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: Cox proportional hazard regression using PHREG in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Cox-proportional-hazard-regression-using-PHREG/m-p/706105#M34212</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;I'm still not sure which part of the syntax would let SAS know the 365 days in time variable for patient B shouldn't be read as the days to ESA because the lost_flag=0 and I don't have esa_use in the dependent variable to provide that information.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry for not grasping your answer, hope you would reply to this message. Thanks&lt;/P&gt;</description>
    <pubDate>Tue, 15 Dec 2020 20:04:07 GMT</pubDate>
    <dc:creator>petax004</dc:creator>
    <dc:date>2020-12-15T20:04:07Z</dc:date>
    <item>
      <title>Cox proportional hazard regression using PHREG</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Cox-proportional-hazard-regression-using-PHREG/m-p/705878#M34202</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my first time doing survival analysis and I tried different intro to cox proportional hazard regression SAS tutorial papers but still I'm not sure if I'm doing this right with the syntax.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attached table is a sample of data I'm working on and the a&lt;SPAN style="font-family: inherit;"&gt;nalysis is to track patients from 01/01/2018 to first time they get ESA use (flagged as 1) and date is captured in esa_date and objective is to use the explanatory variables and Identify which variables can predict ESA use and get the hazard ratios. A patient can get censored because they died, lost in the follow-up, or gaps in coverage (like patient E who lost coverage for some period but have ESA use when they got back on coverage - here is used the lost date to calculate time, please let me know if this is not right)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sample table.png" style="width: 591px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/52612i2EB415152EF37812/image-size/large?v=v2&amp;amp;px=999" role="button" title="sample table.png" alt="sample table.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do I have the right syntax to get what I want, which is explanatory variables hazard ratios for ESA use?&lt;/P&gt;&lt;P&gt;Personally, I don't know why my outcome of interest esa_use should be specified as explanatory variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc phreg data=sample;
class gender (ref="M") esa_use (ref="0") anemia (ref="0")
model time*lost_flag(0)=age gender esa_use anemia_t;
anemia_t=anemia*log(time);
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 23:57:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Cox-proportional-hazard-regression-using-PHREG/m-p/705878#M34202</guid>
      <dc:creator>petax004</dc:creator>
      <dc:date>2020-12-14T23:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: Cox proportional hazard regression using PHREG</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Cox-proportional-hazard-regression-using-PHREG/m-p/705881#M34203</link>
      <description>&lt;P&gt;ESA_USE should not be used as a variable in your model, not sure why you think it should be included.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm assuming you've determined anemia already violates the PH assumption, thus the requirement for a time dependent variable?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc phreg data=sample plots=(survival);
class gender (ref="M")  anemia (ref="0") / param = REF;
model time*lost_flag(0)=age gender anemia_t;
anemia_t=anemia*log(time);
hazardratio gender;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You may also want to use the HAZARDRATIO statement explicitly to examine the HR at different combinations. It's worth looking into the BASELINE statement/options as well, Example 89.8 Survival Curves shows how to use the statement if you need an example (see the full code link at the top of the example page).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=statug&amp;amp;docsetTarget=statug_phreg_syntax03.htm&amp;amp;locale=en"&gt;https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=statug&amp;amp;docsetTarget=statug_phreg_syntax03.htm&amp;amp;locale=en&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/323447"&gt;@petax004&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is my first time doing survival analysis and I tried different intro to cox proportional hazard regression SAS tutorial papers but still I'm not sure if I'm doing this right with the syntax.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Attached table is a sample of data I'm working on and the a&lt;SPAN style="font-family: inherit;"&gt;nalysis is to track patients from 01/01/2018 to first time they get ESA use (flagged as 1) and date is captured in esa_date and objective is to use the explanatory variables and Identify which variables can predict ESA use and get the hazard ratios. A patient can get censored because they died, lost in the follow-up, or gaps in coverage (like patient E who lost coverage for some period but have ESA use when they got back on coverage - here is used the lost date to calculate time, please let me know if this is not right)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sample table.png" style="width: 591px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/52612i2EB415152EF37812/image-size/large?v=v2&amp;amp;px=999" role="button" title="sample table.png" alt="sample table.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do I have the right syntax to get what I want, which is explanatory variables hazard ratios for ESA use?&lt;/P&gt;
&lt;P&gt;Personally, I don't know why my outcome of interest esa_use should be specified as explanatory variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc phreg data=sample;
class gender (ref="M") esa_use (ref="0") anemia (ref="0")
model time*lost_flag(0)=age gender esa_use anemia_t;
anemia_t=anemia*log(time);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Thanks in advance&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 00:17:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Cox-proportional-hazard-regression-using-PHREG/m-p/705881#M34203</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-12-15T00:17:46Z</dc:date>
    </item>
    <item>
      <title>Re: Cox proportional hazard regression using PHREG</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Cox-proportional-hazard-regression-using-PHREG/m-p/705885#M34204</link>
      <description>&lt;P&gt;Thanks for replying&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The time value for patient A is the duration to first ESA use and for patient B it's total number of days from start to end of the study period because the patient doesn't have ESA use and no lost to follow-up so, I thought I've to specify to ESA_USE so regression would know the difference - if you can provide some details on why it shouldn't be used and if we don't use it, how the regression would know the difference between patient A and B time value would be good education for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've not tested whether anemia violates the PH assumptions as it was already defined as time-dependent variable from prior knowledge gathered from literature and clinical reasoning. This is the literature I'm trying to replicate&amp;nbsp;&lt;A href="https://pubmed.ncbi.nlm.nih.gov/19147996/" target="_blank"&gt;Predictors of ESA use in the non-dialysis chronic kidney disease population with anemia - PubMed (nih.gov)&lt;/A&gt;&amp;nbsp;and the sample data I showed is just to show the structure of the data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your reply is helpful &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 00:36:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Cox-proportional-hazard-regression-using-PHREG/m-p/705885#M34204</guid>
      <dc:creator>petax004</dc:creator>
      <dc:date>2020-12-15T00:36:50Z</dc:date>
    </item>
    <item>
      <title>Re: Cox proportional hazard regression using PHREG</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Cox-proportional-hazard-regression-using-PHREG/m-p/705896#M34205</link>
      <description>You don't use it because that information is also contained in the Time and Censor variables, which is why you need both of those. Your event of interest is defined as time to ESA Usage but not everyone develops it or is censored. &lt;BR /&gt;&lt;BR /&gt;So in the traditional survival models, say for cancer, your outcome would be death and those that didn't die are censored and the time to death or censor is used but you wouldn't also include dead in the explanatory variables. Have you worked through the examples in the documentation?&lt;BR /&gt;&lt;BR /&gt;You can verify the PH assumption for your data using the ASSESS statement. &lt;BR /&gt;</description>
      <pubDate>Tue, 15 Dec 2020 01:26:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Cox-proportional-hazard-regression-using-PHREG/m-p/705896#M34205</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-12-15T01:26:06Z</dc:date>
    </item>
    <item>
      <title>Re: Cox proportional hazard regression using PHREG</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Cox-proportional-hazard-regression-using-PHREG/m-p/706105#M34212</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;I'm still not sure which part of the syntax would let SAS know the 365 days in time variable for patient B shouldn't be read as the days to ESA because the lost_flag=0 and I don't have esa_use in the dependent variable to provide that information.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry for not grasping your answer, hope you would reply to this message. Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 20:04:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Cox-proportional-hazard-regression-using-PHREG/m-p/706105#M34212</guid>
      <dc:creator>petax004</dc:creator>
      <dc:date>2020-12-15T20:04:07Z</dc:date>
    </item>
    <item>
      <title>Re: Cox proportional hazard regression using PHREG</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Cox-proportional-hazard-regression-using-PHREG/m-p/706123#M34213</link>
      <description>Your censor flag should indicate that information. It provides the information that the person went at least 365 days without starting to use ESA.</description>
      <pubDate>Tue, 15 Dec 2020 21:16:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Cox-proportional-hazard-regression-using-PHREG/m-p/706123#M34213</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-12-15T21:16:16Z</dc:date>
    </item>
    <item>
      <title>Re: Cox proportional hazard regression using PHREG</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Cox-proportional-hazard-regression-using-PHREG/m-p/706687#M34242</link>
      <description>&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;Following documentation helped: &lt;A href="https://www.sas.com/content/dam/SAS/en_ca/User%20Group%20Presentations/Edmonton-User-Group/NiroshaGunasekara-SurvivingSurvivalAnalysis-Spring2014.pdf" target="_blank"&gt;https://www.sas.com/content/dam/SAS/en_ca/User%20Group%20Presentations/Edmonton-User-Group/NiroshaGunasekara-SurvivingSurvivalAnalysis-Spring2014.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I created a new column called censor and flagged "1" if the patient has lost_flag=1, "2" if the patient doesn't have ESA use but lost_flag=0 and everything is "0"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the SAS code, replaced the &lt;STRONG&gt;time*lost_flag(0)&lt;/STRONG&gt; with &lt;STRONG&gt;time*censor(1,2).&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know if this a right approach. Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Dec 2020 16:05:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Cox-proportional-hazard-regression-using-PHREG/m-p/706687#M34242</guid>
      <dc:creator>petax004</dc:creator>
      <dc:date>2020-12-17T16:05:42Z</dc:date>
    </item>
    <item>
      <title>Re: Cox proportional hazard regression using PHREG</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Cox-proportional-hazard-regression-using-PHREG/m-p/706711#M34243</link>
      <description>lol, that's one of my former interns presentation. &lt;BR /&gt;&lt;BR /&gt;That looks right to me.</description>
      <pubDate>Thu, 17 Dec 2020 17:00:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Cox-proportional-hazard-regression-using-PHREG/m-p/706711#M34243</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-12-17T17:00:13Z</dc:date>
    </item>
  </channel>
</rss>

