<?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 an adjusted -log(log survival) vs log(time) in survival analysis? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Plotting-an-adjusted-log-log-survival-vs-log-time-in-survival/m-p/454279#M284178</link>
    <description>&lt;P&gt;Calculate it manually in a step in between the procedures.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, you should likely use SGPLOT instead of GPLOT.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The documentation has the sample data for VALung here:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://documentation.sas.com/api/docsets/statug/14.3/content/statug_code_phrex3.htm?locale=en" target="_blank"&gt;http://documentation.sas.com/api/docsets/statug/14.3/content/statug_code_phrex3.htm?locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PHREG documentation here:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_phreg_examples03.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en" target="_blank"&gt;http://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_phreg_examples03.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;*Survival model;
proc phreg data=VALung;
    strata therapy;
    class Prior(ref='no') Cell(ref='large') / param=ref;
    model Time*Status(0)=Kps Duration Age Cell Prior;
    baseline out=graph_data1 loglogs=llog survival=surv logsurv=lsur;
run;

*Calculate log of time;
data graph_data2;
    set graph_data1;

    if time=0 then
        log_time=0;
    *cannot take the log of 0;
    else
        log_time=log(time);
run;

*Graph results;
proc sgplot data=graph_data2;
    series x=log_time y=lsur / group=therapy markers;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/178536"&gt;@lousam&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to see if non-proportionality exists for a cox proportional hazards model that is adjusted for multiple factors and is stratified by gender using a plot of -log(log survival) vs. log (time). I would like to include a plot in my final submission.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I know that I can't use "proc lifetest" because that can't adjust for other factors.&amp;nbsp; I am thinking that I might have to do something like the code below and then use proc&amp;nbsp;gplot to graph log(-log survival) vs. log(time). How can I create the plot that I need?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc phreg data=final;&lt;BR /&gt;model Survival_time*sensor(0)= Age BMI Smoking/ties=exact;&lt;BR /&gt;strata Gender;&lt;BR /&gt;Title "Cox proportional hazards model stratified by Gender";&lt;BR /&gt;baseline out=graph loglogs=llog survival=surv logsurv=lsur;&amp;nbsp; run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc gplot data=graph;&lt;/P&gt;
&lt;P&gt;plot llog*(I DON'T KNOW HOW TO GET THE LOG TIME)=Gender&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I appreciate any help you can give me&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 15 Apr 2018 18:18:54 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-04-15T18:18:54Z</dc:date>
    <item>
      <title>Plotting an adjusted -log(log survival) vs log(time) in survival analysis?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Plotting-an-adjusted-log-log-survival-vs-log-time-in-survival/m-p/454269#M284177</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to see if non-proportionality exists for a cox proportional hazards model that is adjusted for multiple factors and is stratified by gender using a plot of -log(log survival) vs. log (time). I would like to include a plot in my final submission.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know that I can't use "proc lifetest" because that can't adjust for other factors.&amp;nbsp; I am thinking that I might have to do something like the code below and then use proc&amp;nbsp;gplot to graph log(-log survival) vs. log(time). How can I create the plot that I need?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc phreg data=final;&lt;BR /&gt;model Survival_time*sensor(0)= Age BMI Smoking/ties=exact;&lt;BR /&gt;strata Gender;&lt;BR /&gt;Title "Cox proportional hazards model stratified by Gender";&lt;BR /&gt;baseline out=graph loglogs=llog survival=surv logsurv=lsur;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc gplot data=graph;&lt;/P&gt;&lt;P&gt;plot llog*(I DON'T KNOW HOW TO GET THE LOG TIME)=Gender&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appreciate any help you can give me&lt;/P&gt;</description>
      <pubDate>Sun, 15 Apr 2018 15:36:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Plotting-an-adjusted-log-log-survival-vs-log-time-in-survival/m-p/454269#M284177</guid>
      <dc:creator>lousam</dc:creator>
      <dc:date>2018-04-15T15:36:46Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting an adjusted -log(log survival) vs log(time) in survival analysis?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Plotting-an-adjusted-log-log-survival-vs-log-time-in-survival/m-p/454279#M284178</link>
      <description>&lt;P&gt;Calculate it manually in a step in between the procedures.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, you should likely use SGPLOT instead of GPLOT.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The documentation has the sample data for VALung here:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://documentation.sas.com/api/docsets/statug/14.3/content/statug_code_phrex3.htm?locale=en" target="_blank"&gt;http://documentation.sas.com/api/docsets/statug/14.3/content/statug_code_phrex3.htm?locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PHREG documentation here:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_phreg_examples03.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en" target="_blank"&gt;http://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_phreg_examples03.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;*Survival model;
proc phreg data=VALung;
    strata therapy;
    class Prior(ref='no') Cell(ref='large') / param=ref;
    model Time*Status(0)=Kps Duration Age Cell Prior;
    baseline out=graph_data1 loglogs=llog survival=surv logsurv=lsur;
run;

*Calculate log of time;
data graph_data2;
    set graph_data1;

    if time=0 then
        log_time=0;
    *cannot take the log of 0;
    else
        log_time=log(time);
run;

*Graph results;
proc sgplot data=graph_data2;
    series x=log_time y=lsur / group=therapy markers;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/178536"&gt;@lousam&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to see if non-proportionality exists for a cox proportional hazards model that is adjusted for multiple factors and is stratified by gender using a plot of -log(log survival) vs. log (time). I would like to include a plot in my final submission.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I know that I can't use "proc lifetest" because that can't adjust for other factors.&amp;nbsp; I am thinking that I might have to do something like the code below and then use proc&amp;nbsp;gplot to graph log(-log survival) vs. log(time). How can I create the plot that I need?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc phreg data=final;&lt;BR /&gt;model Survival_time*sensor(0)= Age BMI Smoking/ties=exact;&lt;BR /&gt;strata Gender;&lt;BR /&gt;Title "Cox proportional hazards model stratified by Gender";&lt;BR /&gt;baseline out=graph loglogs=llog survival=surv logsurv=lsur;&amp;nbsp; run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc gplot data=graph;&lt;/P&gt;
&lt;P&gt;plot llog*(I DON'T KNOW HOW TO GET THE LOG TIME)=Gender&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I appreciate any help you can give me&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 15 Apr 2018 18:18:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Plotting-an-adjusted-log-log-survival-vs-log-time-in-survival/m-p/454279#M284178</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-04-15T18:18:54Z</dc:date>
    </item>
  </channel>
</rss>

