<?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: Proc Lifetest customising  strata=panel curve in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Lifetest-customising-strata-panel-curve/m-p/740100#M35964</link>
    <description>&lt;P&gt;sorry, I have already seen these links but they couldn't help me further&lt;/P&gt;</description>
    <pubDate>Mon, 10 May 2021 06:54:39 GMT</pubDate>
    <dc:creator>Anita_n</dc:creator>
    <dc:date>2021-05-10T06:54:39Z</dc:date>
    <item>
      <title>Proc Lifetest customising  strata=panel curve</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Lifetest-customising-strata-panel-curve/m-p/740034#M35953</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a question about customising the proc lifetest curve for &lt;STRONG&gt;strata=panel&lt;/STRONG&gt;. Which part of the proc lifetest template does&amp;nbsp;that (I used this template on this link)&amp;nbsp; &amp;nbsp;&lt;A href="https://support.sas.com/documentation/onlinedoc/stat/ex_code/142/templft.html" target="_blank"&gt;https://support.sas.com/documentation/onlinedoc/stat/ex_code/142/templft.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Here is the code I used&amp;nbsp; for the normal curve &lt;STRONG&gt;without&lt;/STRONG&gt; strata=panel. I wish to customise strata =panel the same way.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;%ProvideSurvivalMacros
%let tatters = textattrs=(size=12pt weight=bold family='Calibri' color=cornflowerblue);
%let TitleText2 = "Overall Survival-Kaplan-Meier (RCC)"/&amp;amp;tatters; /* Change the title. */
%let nTitles = 1;
%let GraphOpts = DesignHeight=400px;
%let LegendOpts = ;
%let InsetOpts = ;

%let yOptions = label="survivalrate"
shortlabel= "survival" labelattrs=(size=10pt family='Calibri' ) tickvalueattrs=(size=8pt)
linearopts=(viewmin=0.2 viewmax=1 tickvaluelist=(0 .2 .4 .6 .8 1.0));
%let StepOpts = lineattrs=(thickness=2.0);


%let GraphOpts = DataContrastColors=(cornflowerblue moccasin darkblue darkred)
DataColors=(cornflowerblue moccasin darkblue darkred);

%let xOptions = label="Time(in days)" offsetmin=.05 linearopts=(viewmax=MAXTIME tickvaluelist=XTICKVALS
tickvaluefitpolicy=XTICKVALFITPOL)labelattrs=(size=10pt family='Calibri' ) tickvalueattrs=(size=8pt);

%let LegendOpts = title="AML" location=inside across=2 autoalign=(TopRight) ;

%let censored = markerattrs=(symbol=circlefilled size=5px );
%let censorstr = "(*ESC*){Unicode '25cf'x} censored" / textattrs=GraphValueText(family=GraphUnicodeText:FontFamily color=LightSlateGray);

proc template;
delete Stat.Lifetest.Graphics.ProductLimitSurvival / store=sasuser.templat;
delete Stat.Lifetest.Graphics.ProductLimitSurvival2 / store=sasuser.templat;
%CompileSurvivalTemplates

ods graphics on;
proc lifetest data=sashelp.BMT plots=(s(cb=hw test ATRISK strata=panel));
time T * Status(0);
strata Group;
run;
ods graphics off;

&lt;/PRE&gt;
&lt;P&gt;I will appreciate any help&lt;/P&gt;</description>
      <pubDate>Sun, 09 May 2021 09:11:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Lifetest-customising-strata-panel-curve/m-p/740034#M35953</guid>
      <dc:creator>Anita_n</dc:creator>
      <dc:date>2021-05-09T09:11:47Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Lifetest customising  strata=panel curve</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Lifetest-customising-strata-panel-curve/m-p/740037#M35954</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I do not know by heart w&lt;SPAN&gt;hich part of the proc lifetest template does&amp;nbsp;that, but you may find below paper interesting and inspiring. You will probably find out the answer to your question yourself by reading this paper in-depth:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Paper 427-2013&lt;BR /&gt;Creating and Customizing the Kaplan-Meier Survival Plot in PROC LIFETEST&lt;BR /&gt;Warren F. Kuhfeld and Ying So, SAS Institute Inc.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://support.sas.com/resources/papers/proceedings13/427-2013.pdf" target="_blank" rel="noopener"&gt;https://support.sas.com/resources/papers/proceedings13/427-2013.pdf&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you don't want to read on a Sunday&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;, look at this video:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Creating and customizing the Kaplan-Meier Survival Plot in PROC LIFETEST&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://video.sas.com/detail/video/2918155168001/creating-and-customizing-the-kaplan-meier-survival-plot-in-proc-lifetest" target="_blank" rel="noopener"&gt;https://video.sas.com/detail/video/2918155168001/creating-and-customizing-the-kaplan-meier-survival-plot-in-proc-lifetest&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Good luck,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Koen&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 09 May 2021 10:21:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Lifetest-customising-strata-panel-curve/m-p/740037#M35954</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2021-05-09T10:21:30Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Lifetest customising  strata=panel curve</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Lifetest-customising-strata-panel-curve/m-p/740100#M35964</link>
      <description>&lt;P&gt;sorry, I have already seen these links but they couldn't help me further&lt;/P&gt;</description>
      <pubDate>Mon, 10 May 2021 06:54:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Lifetest-customising-strata-panel-curve/m-p/740100#M35964</guid>
      <dc:creator>Anita_n</dc:creator>
      <dc:date>2021-05-10T06:54:39Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Lifetest customising  strata=panel curve</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Lifetest-customising-strata-panel-curve/m-p/740730#M36001</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;
&lt;P&gt;I finally found out that the Template used to display the panels is&amp;nbsp;&lt;STRONG&gt;Stat.Lifetest.Graphics.ProductLimitSurvivalPanel. &lt;/STRONG&gt;I am tring&amp;nbsp; to customise this to the way I want&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but I will need a little bit help. I wish to have a different color for each panel. In my case I have four panels. I realise if I make changes to the section if&amp;nbsp;&lt;FONT color="#FF0000"&gt;PLOTCENSORED &lt;FONT color="#000000"&gt;it affects the 4 panels&amp;nbsp; but I want to define for example these colours (blue green gray red) each one colour should affect the corresponding panel,&amp;nbsp; the following features: plotband, plotatrisk, plotlegend and group title.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;FONT color="#000000"&gt;I will also wish to change the x-axis label, I can't really findout I to do that. I will appreciate any help&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;FONT color="#000000"&gt;Here is the code:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;PRE&gt;proc template;
source Stat.Lifetest.Graphics.ProductLimitSurvivalPanel;
define statgraph Stat.Lifetest.Graphics.ProductLimitSurvivalPanel;
   dynamic nRows nColumns method xName plotAtRisk plotCensored plotCL plotHW plotEP plotBand
      plotLegend labelCL labelHW labelEP HeaderDisplay PanelNum yMin xtickVals xtickValFitPol
      maxTime _byline_ _bytitle_ _byfootnote_;
   BeginGraph;
      entrytitle  " Patients BMT";
      *if (PLOTATRISK)
         entrytitle " " / textattrs=GRAPHVALUETEXT;
      *endif;
      layout datapanel classvars=(STRATUM) / rowaxisopts=(display=(ticks tickvalues) altdisplay=(
         ticks tickvalues) linearopts=(viewmin=YMIN viewmax=1 tickvaluelist=( .2 .4 .6 .8 1.0)))
         headerlabeldisplay=HEADERDISPLAY rows=NROWS columns=NCOLUMNS columnaxisopts=(shortlabel=
         XNAME linearopts=(viewmax=MAXTIME tickvaluelist=XTICKVALS tickvaluefitpolicy=
         XTICKVALFITPOL)) cellheightmin=10 cellwidthmin=10 rowdatarange=unionall columndatarange=
         unionall panelnumber=PANELNUM start=TOPLEFT skipemptycells=TRUE order=PACKED shrinkfonts=
         TRUE;
         layout prototype;
            if (PLOTHW)
               if (PLOTEP)
                  bandplot LimitUpper=HW_UCL LimitLower=HW_LCL x=TIME / displayTail=false
                     modelname="Survival" fillattrs=GRAPHDATA1 datatransparency=.55 name="HW"
                     legendlabel=LABELHW;
                  bandplot LimitUpper=EP_UCL LimitLower=EP_LCL x=TIME / displayTail=false
                     modelname="Survival" fillattrs=GRAPHDATA2 datatransparency=.55 name="EP"
                     legendlabel=LABELEP;
               else
                  bandplot LimitUpper=HW_UCL LimitLower=HW_LCL x=TIME / displayTail=false
                     modelname="Survival" fillattrs=GRAPHCONFIDENCE name="HW" legendlabel=LABELHW;
               endif;
            else
               if (PLOTEP)
                  bandplot LimitUpper=EP_UCL LimitLower=EP_LCL x=TIME / displayTail=false
                  modelname="Survival" fillattrs=GRAPHCONFIDENCE name="EP" legendlabel=LABELEP ;
               endif;
            endif;
            if (PLOTCL)
               if (PLOTBAND)
                  bandplot LimitUpper=SDF_UCL LimitLower=SDF_LCL x=TIME / displayTail=false
                     modelname="Survival" display=(outline) outlineattrs=GRAPHPREDICTIONLIMITS
                     name="CL" legendlabel=LABELCL;
               else
                  bandplot LimitUpper=SDF_UCL LimitLower=SDF_LCL x=TIME / displayTail=false
                     modelname="Survival" fillattrs=GRAPHCONFIDENCE name="CL" legendlabel=LABELCL;
               endif;
            endif;
            stepplot x=TIME y=SURVIVAL / name="Survival" rolename=(_tip1=ATRISK _tip2=EVENT)
               tiplabel=(_tip1="Anzahl mit Risiko" _tip2="Beobachtete Ereignisse") tip=(x y _tip1
               _tip2) legendlabel="Überleben";
            if (PLOTCENSORED)
               scatterplot y=CENSORED x=TIME / tiplabel=(y="Survival Probability")
                  markerattrs=(symbol=circlefilled color=darkred size=5px ) name="Censored" legendlabel="Zensiert";
            endif;
            if (PLOTATRISK)
               scatterplot x=TATRISK y=Y2 / markercharacter=ATRISK ;
            endif;
         endlayout;
         sidebar / align=left;
            entry "Survival Probaility" / textattrs=GRAPHLABELTEXT rotate=90;
         endsidebar;
         if (PLOTLEGEND)
            sidebar / align=bottom;
               discretelegend 'Censored' 'CL' 'HW' 'EP' / across=4;
            endsidebar;
         endif;
      endlayout;
      if (_BYTITLE_)
         entrytitle _BYLINE_ / textattrs=GRAPHVALUETEXT;
      else
         if (_BYFOOTNOTE_)
            entryfootnote halign=left _BYLINE_;
         endif;
      endif;
   EndGraph;
end;
run;

ods graphics on;
proc lifetest data=sashelp.BMT plots=(s(cb=hw test ATRISK strata=panel));
time T * Status(0);
strata Group;
run;
ods graphics off;
&lt;/PRE&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;FONT color="#000000"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 May 2021 06:28:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Lifetest-customising-strata-panel-curve/m-p/740730#M36001</guid>
      <dc:creator>Anita_n</dc:creator>
      <dc:date>2021-05-12T06:28:32Z</dc:date>
    </item>
  </channel>
</rss>

