<?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: Plotting cumulative hazard function using the Nelson Aalen estimator for a time-varing exposure in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Plotting-cumulative-hazard-function-using-the-Nelson-Aalen/m-p/530796#M145175</link>
    <description>&lt;P&gt;I'm basing this on the methods used in the paper, which seem to be just PROC LIFETEST.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have a different methodology than the paper, then you do need to explain your methodology and provide some reference for the calculation.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC PRHEG&amp;nbsp;will handle time-dependent so that may be the option that works for you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's been a few days, so the details are not fresh in my mind anymore.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 28 Jan 2019 21:11:40 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2019-01-28T21:11:40Z</dc:date>
    <item>
      <title>Plotting cumulative hazard function using the Nelson Aalen estimator for a time-varing exposure</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Plotting-cumulative-hazard-function-using-the-Nelson-Aalen/m-p/529315#M144594</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create a plot of the cumulative hazard of an outcome over time for a time-varying exposure using the Nelson-Aalen estimator in SAS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The figure should look something like the Figure 1 attached here. I also need to know the breakdown of the risk set, no events etc. at each time point.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The graph with additional details are in this article:&lt;/P&gt;&lt;P&gt;Munoz-Price LS, Frencken JF, Tarima S, Bonten M. Handling Time-dependent Variables: Antibiotics and Antibiotic Resistance. Clin Infect Dis 2016;62:1558-1563.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any advice would be really appreciated.&lt;/P&gt;&lt;P&gt;Thanks you.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jan 2019 02:38:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Plotting-cumulative-hazard-function-using-the-Nelson-Aalen/m-p/529315#M144594</guid>
      <dc:creator>blackandwhite</dc:creator>
      <dc:date>2019-01-23T02:38:10Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting cumulative hazard function using the Nelson Aalen estimator for a time-varing exposure</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Plotting-cumulative-hazard-function-using-the-Nelson-Aalen/m-p/529325#M144599</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/166182"&gt;@blackandwhite&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to create a plot of the cumulative hazard of an outcome over time for a time-varying exposure using the Nelson-Aalen estimator in SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The figure should look something like the Figure 1 attached here. I also need to know the breakdown of the risk set, no events etc. at each time point.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The graph with additional details are in this article:&lt;/P&gt;
&lt;P&gt;Munoz-Price LS, Frencken JF, Tarima S, Bonten M. Handling Time-dependent Variables: Antibiotics and Antibiotic Resistance. Clin Infect Dis 2016;62:1558-1563.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any advice would be really appreciated.&lt;/P&gt;
&lt;P&gt;Thanks you.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Ok, which part are you having problems with? You haven't provided data or anything so it's a bit hard to comment, but I'm going to guess you want a PROC PHREG to start out with.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's the documentation reference:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_phreg_examples06.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en" target="_blank"&gt;https://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_phreg_examples06.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That should get you started.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jan 2019 03:30:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Plotting-cumulative-hazard-function-using-the-Nelson-Aalen/m-p/529325#M144599</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-01-23T03:30:33Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting cumulative hazard function using the Nelson Aalen estimator for a time-varing exposure</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Plotting-cumulative-hazard-function-using-the-Nelson-Aalen/m-p/529326#M144600</link>
      <description>&lt;P&gt;After reviewing the paper, actually, this is only PROC LIFETEST that you need, which is much simpler.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can specify NELSON on the PROC LIFETEST statement.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unfortunately I don't see an easy way to get the plots of those estimates.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC LIFETEST documentation:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_lifetest_syntax01.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en#statug.lifetest.lftnelson" target="_blank"&gt;https://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_lifetest_syntax01.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en#statug.lifetest.lftnelson&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's a tutorial on getting the estimates, saving them to a data set and plotting it 'manually' using SGPLOT. You'll just have to change the column references.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/graphicallyspeaking/2018/02/19/survival-plot-twist-using-sgplot-procedure/" target="_blank"&gt;https://blogs.sas.com/content/graphicallyspeaking/2018/02/19/survival-plot-twist-using-sgplot-procedure/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The full code is at the bottom of the post. I would suggest running the example and then doing yours step by step to convert the code to work with your data.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EDIT: added reference to PROC LIFETEST&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/166182"&gt;@blackandwhite&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to create a plot of the cumulative hazard of an outcome over time for a time-varying exposure using the Nelson-Aalen estimator in SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The figure should look something like the Figure 1 attached here. I also need to know the breakdown of the risk set, no events etc. at each time point.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The graph with additional details are in this article:&lt;/P&gt;
&lt;P&gt;Munoz-Price LS, Frencken JF, Tarima S, Bonten M. Handling Time-dependent Variables: Antibiotics and Antibiotic Resistance. Clin Infect Dis 2016;62:1558-1563.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any advice would be really appreciated.&lt;/P&gt;
&lt;P&gt;Thanks you.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jan 2019 03:43:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Plotting-cumulative-hazard-function-using-the-Nelson-Aalen/m-p/529326#M144600</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-01-23T03:43:20Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting cumulative hazard function using the Nelson Aalen estimator for a time-varing exposure</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Plotting-cumulative-hazard-function-using-the-Nelson-Aalen/m-p/530786#M145170</link>
      <description>&lt;P&gt;Hi and thanks for your answer.&lt;/P&gt;&lt;P&gt;Proc lifetest only works for dataset structured with a row per patient ID, not when it is in counting process, which is necessary to accommodate a time-varying exposure.&lt;/P&gt;&lt;P&gt;Perhaps I misunderstood your answer?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jan 2019 21:01:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Plotting-cumulative-hazard-function-using-the-Nelson-Aalen/m-p/530786#M145170</guid>
      <dc:creator>blackandwhite</dc:creator>
      <dc:date>2019-01-28T21:01:49Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting cumulative hazard function using the Nelson Aalen estimator for a time-varing exposure</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Plotting-cumulative-hazard-function-using-the-Nelson-Aalen/m-p/530796#M145175</link>
      <description>&lt;P&gt;I'm basing this on the methods used in the paper, which seem to be just PROC LIFETEST.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have a different methodology than the paper, then you do need to explain your methodology and provide some reference for the calculation.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC PRHEG&amp;nbsp;will handle time-dependent so that may be the option that works for you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's been a few days, so the details are not fresh in my mind anymore.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jan 2019 21:11:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Plotting-cumulative-hazard-function-using-the-Nelson-Aalen/m-p/530796#M145175</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-01-28T21:11:40Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting cumulative hazard function using the Nelson Aalen estimator for a time-varing exposure</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Plotting-cumulative-hazard-function-using-the-Nelson-Aalen/m-p/530798#M145176</link>
      <description>&lt;P&gt;Proc phreg won't work to plot a NA curve for a TD variable, neither proc lifetest.&lt;/P&gt;&lt;P&gt;I had already looked into it&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jan 2019 21:19:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Plotting-cumulative-hazard-function-using-the-Nelson-Aalen/m-p/530798#M145176</guid>
      <dc:creator>blackandwhite</dc:creator>
      <dc:date>2019-01-28T21:19:28Z</dc:date>
    </item>
  </channel>
</rss>

