<?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 rate (Nelson Aalen curves) in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Plotting-cumulative-hazard-rate-Nelson-Aalen-curves/m-p/353712#M18524</link>
    <description>&lt;P&gt;You can get the cumulative hazard (Nelson Aalen) by using the baseline statement in PHREG;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As Nelson Aalen only can account for one combination of covariates at a time you will need to put all covariates into the strata statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a simple example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
do i=1 to 100;
x=mod(i,2);
t=rand('exponential',1);
output;
end;
run;

proc phreg data=test;
  model t=;
  strata x;
  baseline out=baseline cumhaz=cumhaz;
run; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You can then plot the hazard by using proc gplot or sgplot.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 26 Apr 2017 14:30:08 GMT</pubDate>
    <dc:creator>JacobSimonsen</dc:creator>
    <dc:date>2017-04-26T14:30:08Z</dc:date>
    <item>
      <title>Plotting cumulative hazard rate (Nelson Aalen curves)</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Plotting-cumulative-hazard-rate-Nelson-Aalen-curves/m-p/351658#M18427</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working on survival data with incidence of cancer and some food consumption data in quartiles.&lt;/P&gt;&lt;P&gt;Exposition : quartile of sugared food&lt;/P&gt;&lt;P&gt;Confusion factor : age, BMI, sex.&lt;/P&gt;&lt;P&gt;Outcome : cancer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to draw a curve of &lt;SPAN class="st"&gt;cumulative hazard rate function&lt;/SPAN&gt; (for example with Nelson Aalen estimator, a non parametric estimator of the cumulative hazard rate function) like this graph below : where we would see the cumulative risk of cancer in function of the 4 quartiles of food consumption.&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/8418i76F10D5277CD8AAD/image-size/original?v=1.0&amp;amp;px=-1" alt="nelson Aalen curve.JPG" title="nelson Aalen curve.JPG" border="0" /&gt;&lt;/P&gt;&lt;P&gt;Caption of the graph : "Nelson-Aalen curves showing the outcome of new-onset overweight depending on ultraprocessed food consumption at baseline. Adjusted for sex, age, marital status, educational status"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If someone had an idea of a beginning of script, i would be really grateful.&lt;/P&gt;&lt;P&gt;i am doing Cox model with this type of script :&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc phreg data=mydata;
class sexe;
model survival_time*censure(1)=sexe age IMC;
strata quartile_ultraprocessed ;
    run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks in advance, have a nice day,&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2017 13:07:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Plotting-cumulative-hazard-rate-Nelson-Aalen-curves/m-p/351658#M18427</guid>
      <dc:creator>Lostinstats</dc:creator>
      <dc:date>2017-04-20T13:07:36Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting cumulative hazard rate (Nelson Aalen curves)</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Plotting-cumulative-hazard-rate-Nelson-Aalen-curves/m-p/351921#M18447</link>
      <description>&lt;P&gt;Have you tried adding the PLOTSooption to your PROC statement?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You'll want tthe 'statistical' style to get the curves in a similar format but you'll have to manually add the data at the top. If you can post it at the bottom of the graph that could be more easily incorporated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2017 20:49:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Plotting-cumulative-hazard-rate-Nelson-Aalen-curves/m-p/351921#M18447</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-04-20T20:49:13Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting cumulative hazard rate (Nelson Aalen curves)</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Plotting-cumulative-hazard-rate-Nelson-Aalen-curves/m-p/353712#M18524</link>
      <description>&lt;P&gt;You can get the cumulative hazard (Nelson Aalen) by using the baseline statement in PHREG;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As Nelson Aalen only can account for one combination of covariates at a time you will need to put all covariates into the strata statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a simple example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
do i=1 to 100;
x=mod(i,2);
t=rand('exponential',1);
output;
end;
run;

proc phreg data=test;
  model t=;
  strata x;
  baseline out=baseline cumhaz=cumhaz;
run; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You can then plot the hazard by using proc gplot or sgplot.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2017 14:30:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Plotting-cumulative-hazard-rate-Nelson-Aalen-curves/m-p/353712#M18524</guid>
      <dc:creator>JacobSimonsen</dc:creator>
      <dc:date>2017-04-26T14:30:08Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting cumulative hazard rate (Nelson Aalen curves)</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Plotting-cumulative-hazard-rate-Nelson-Aalen-curves/m-p/354036#M18539</link>
      <description>&lt;P&gt;thanks for your answers.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I tested your statements but I don't know why when I look at the table "baseline" created and containing "Cumulative Hazard function estimates", there are only about 2000 observations. And in my dataset of departure, I have about 100 000 observations (about 2200 events and 97 800 censored). Do you have an idea why I have this decrease ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;have a nice day,&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2017 10:26:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Plotting-cumulative-hazard-rate-Nelson-Aalen-curves/m-p/354036#M18539</guid>
      <dc:creator>Lostinstats</dc:creator>
      <dc:date>2017-04-27T10:26:59Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting cumulative hazard rate (Nelson Aalen curves)</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Plotting-cumulative-hazard-rate-Nelson-Aalen-curves/m-p/354040#M18540</link>
      <description>&lt;P&gt;the estimated cumulative hazard function only has as many jumps (its a step function) as there are uncensored events. So wiht 2200 events it should have 2200 observations.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2017 10:38:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Plotting-cumulative-hazard-rate-Nelson-Aalen-curves/m-p/354040#M18540</guid>
      <dc:creator>JacobSimonsen</dc:creator>
      <dc:date>2017-04-27T10:38:23Z</dc:date>
    </item>
  </channel>
</rss>

