<?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 incidence on a log scale in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/plotting-cumulative-incidence-on-a-log-scale/m-p/692397#M210931</link>
    <description>&lt;P&gt;The code below creates a graph similar to yours:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* Create test data */

data have;
do t=0 to 3 by 0.05;
  a=0.0265*t+0.00583;
  b=0.0416*t+0.00295;
  output;
end;
run;

/* Create graph from test data */

proc format;
value ytickm
.05, .1=[4.2]
other=' ';
run;

data tick015;
length text $9 function $5;
function='move'; xsys='2'; ysys='2'; x=-0.02; y=0.15; output;
function='label'; position='&amp;lt;'; text='0.15&amp;nbsp;&amp;nbsp;&amp;nbsp;'; hsys='D'; size=9; output;
run;

goptions reset=all cback=CXEAF2F3;
title 'Nelson-Aalen cumulative hazard estimates';
legend1 label=none frame cborder=black cframe=white value=('group=A' 'group=B');
symbol1 i=stepjr c=blue;
symbol2 i=stepjr c=red;
axis1 order=0 to 3 offset=(1) label=('analysis time') minor=none;
axis2 logbase=10 logstyle=expand order=(.0015625 .003125 .00625 .0125 .025 .05 .1 .2)
      offset=(0,0) label=none major=none;

proc gplot data=have annotate=tick015;
format a b ytickm.;
plot a*t=1 b*t=2 / overlay haxis=axis1 vaxis=axis2 legend=legend1
                   vref=0.05 0.1 0.15 cvref=CXEAF2F3;
run;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 18 Oct 2020 20:31:03 GMT</pubDate>
    <dc:creator>FreelanceReinh</dc:creator>
    <dc:date>2020-10-18T20:31:03Z</dc:date>
    <item>
      <title>plotting cumulative incidence on a log scale</title>
      <link>https://communities.sas.com/t5/SAS-Programming/plotting-cumulative-incidence-on-a-log-scale/m-p/692174#M210801</link>
      <description>&lt;P&gt;I am trying to plot a nelson-aalen (cumulative incidence) curve with the y-axis (incidence) on a logarithmic scale. I have been using proc gplot to create the NA curve, but cannot find the option of changing the y-axis to a log scale. I am happy to use a solution that doesn't rely on proc gplot&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;</description>
      <pubDate>Fri, 16 Oct 2020 17:09:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/plotting-cumulative-incidence-on-a-log-scale/m-p/692174#M210801</guid>
      <dc:creator>ghbg</dc:creator>
      <dc:date>2020-10-16T17:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: plotting cumulative incidence on a log scale</title>
      <link>https://communities.sas.com/t5/SAS-Programming/plotting-cumulative-incidence-on-a-log-scale/m-p/692182#M210804</link>
      <description>In SGPLOT look at the X/YAXIS statement which include log options such as logbase, logstyle, and TYPE which specifies the type of the axis.&lt;BR /&gt;&lt;BR /&gt;In general, SG procedures create better quality graphs.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 16 Oct 2020 17:22:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/plotting-cumulative-incidence-on-a-log-scale/m-p/692182#M210804</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-10-16T17:22:05Z</dc:date>
    </item>
    <item>
      <title>Re: plotting cumulative incidence on a log scale</title>
      <link>https://communities.sas.com/t5/SAS-Programming/plotting-cumulative-incidence-on-a-log-scale/m-p/692193#M210811</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/258509"&gt;@ghbg&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For PROC GPLOT (i.e. SAS/GRAPH) you define the axis with an &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=graphref&amp;amp;docsetTarget=p0rvgwbkch5iqsn1rghqth2dl59y.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;AXIS statement&lt;/A&gt; and refer to it in an option of the PLOT statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
do x=1 to 10;
  y=exp(x);
  output;
end;
run;

goptions reset=all;
axis1 logbase=e logstyle=power;

proc gplot data=have;
plot y*x / vaxis=axis1;
run;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 16 Oct 2020 17:47:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/plotting-cumulative-incidence-on-a-log-scale/m-p/692193#M210811</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2020-10-16T17:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: plotting cumulative incidence on a log scale</title>
      <link>https://communities.sas.com/t5/SAS-Programming/plotting-cumulative-incidence-on-a-log-scale/m-p/692299#M210875</link>
      <description>&lt;P&gt;thanks for this.&lt;/P&gt;&lt;P&gt;what i actually want to do is have the y-axis log-scaled, meaning that the distance between the ticks represent exponentially more of the axis value as you move along the axis - this would mean, for example, ticks that are the same distance apart on the y-axis represent 1,10,100,1000,10000, and so on.&lt;/P&gt;&lt;P&gt;the final graph will look something like the attached, which i made in stata using the cumhaz ylog options of the stsgraph command.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Oct 2020 13:50:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/plotting-cumulative-incidence-on-a-log-scale/m-p/692299#M210875</guid>
      <dc:creator>ghbg</dc:creator>
      <dc:date>2020-10-17T13:50:04Z</dc:date>
    </item>
    <item>
      <title>Re: plotting cumulative incidence on a log scale</title>
      <link>https://communities.sas.com/t5/SAS-Programming/plotting-cumulative-incidence-on-a-log-scale/m-p/692387#M210923</link>
      <description>logbase option specifies the intervals. In the solution provided, it was e, but you can change that to a base of 10 which is what you want.</description>
      <pubDate>Sun, 18 Oct 2020 19:11:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/plotting-cumulative-incidence-on-a-log-scale/m-p/692387#M210923</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-10-18T19:11:12Z</dc:date>
    </item>
    <item>
      <title>Re: plotting cumulative incidence on a log scale</title>
      <link>https://communities.sas.com/t5/SAS-Programming/plotting-cumulative-incidence-on-a-log-scale/m-p/692397#M210931</link>
      <description>&lt;P&gt;The code below creates a graph similar to yours:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* Create test data */

data have;
do t=0 to 3 by 0.05;
  a=0.0265*t+0.00583;
  b=0.0416*t+0.00295;
  output;
end;
run;

/* Create graph from test data */

proc format;
value ytickm
.05, .1=[4.2]
other=' ';
run;

data tick015;
length text $9 function $5;
function='move'; xsys='2'; ysys='2'; x=-0.02; y=0.15; output;
function='label'; position='&amp;lt;'; text='0.15&amp;nbsp;&amp;nbsp;&amp;nbsp;'; hsys='D'; size=9; output;
run;

goptions reset=all cback=CXEAF2F3;
title 'Nelson-Aalen cumulative hazard estimates';
legend1 label=none frame cborder=black cframe=white value=('group=A' 'group=B');
symbol1 i=stepjr c=blue;
symbol2 i=stepjr c=red;
axis1 order=0 to 3 offset=(1) label=('analysis time') minor=none;
axis2 logbase=10 logstyle=expand order=(.0015625 .003125 .00625 .0125 .025 .05 .1 .2)
      offset=(0,0) label=none major=none;

proc gplot data=have annotate=tick015;
format a b ytickm.;
plot a*t=1 b*t=2 / overlay haxis=axis1 vaxis=axis2 legend=legend1
                   vref=0.05 0.1 0.15 cvref=CXEAF2F3;
run;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 18 Oct 2020 20:31:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/plotting-cumulative-incidence-on-a-log-scale/m-p/692397#M210931</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2020-10-18T20:31:03Z</dc:date>
    </item>
  </channel>
</rss>

