<?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: How to omit one level variable from Kaplan-Meier Graphic in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/How-to-omit-one-level-variable-from-Kaplan-Meier-Graphic/m-p/506663#M1370</link>
    <description>&lt;P&gt;Could you give an example of how&amp;nbsp;I&lt;SPAN&gt;&amp;nbsp;capture the output and graph only elements I am interested in for the "independent_v2", for example?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you!&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 22 Oct 2018 20:54:24 GMT</pubDate>
    <dc:creator>MFraga</dc:creator>
    <dc:date>2018-10-22T20:54:24Z</dc:date>
    <item>
      <title>How to omit one level variable from Kaplan-Meier Graphic</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-omit-one-level-variable-from-Kaplan-Meier-Graphic/m-p/506597#M1362</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to produce Kaplan-Meier results and graphics, but for the Graphic I would like to omit the curves for one or two levels of my independent variable (and do not exclude these observations from the calculations). Does anyone know how to do it ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For instance, in the dataset below, I would like to exclude the level&amp;nbsp; "3" of the variable "&lt;SPAN&gt;independent_v2".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;An example of my dataset would be:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&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3 1&lt;/P&gt;&lt;P&gt;6 3 0 1.05 3 1&lt;/P&gt;&lt;P&gt;6 4 0 1.05 3 1&lt;/P&gt;&lt;P&gt;6 5 1 1.05 3 1&lt;/P&gt;&lt;P&gt;6 6 . 1.05 3 1&lt;/P&gt;&lt;P&gt;6 7 . 1.05 1 1&lt;/P&gt;&lt;P&gt;6 8 . 1.05 1 1&lt;/P&gt;&lt;P&gt;7 0 0 0.89 0 3&lt;/P&gt;&lt;P&gt;7 1 0 0.89 0 3&lt;/P&gt;&lt;P&gt;7 2 0 0.89 0 3&lt;/P&gt;&lt;P&gt;7 3 0 0.89 0 3&lt;/P&gt;&lt;P&gt;7 4 0 0.89 0 3&lt;/P&gt;&lt;P&gt;7 5 0 0.89 0 3&lt;/P&gt;&lt;P&gt;7 6 0 0.89 0 3&lt;/P&gt;&lt;P&gt;7 7 0 0.89 0 3&lt;/P&gt;&lt;P&gt;7 8 1 0.89 0 1&lt;/P&gt;&lt;P&gt;7 9 . 0.89 0 1&lt;/P&gt;&lt;P&gt;7 10 . 0.89 0 1&lt;/P&gt;&lt;P&gt;8 0 0 1.1 1 0&lt;/P&gt;&lt;P&gt;8 1 0 1.1 1 1&lt;/P&gt;&lt;P&gt;8 2 0 1.1 1 1&lt;/P&gt;&lt;P&gt;8 3 . 1.1 1 2&lt;/P&gt;&lt;P&gt;8 4 . 1.1 1 2&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I run the survival analysis like that:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data _temp;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;by id;&lt;/P&gt;&lt;P&gt;retain time;&lt;/P&gt;&lt;P&gt;if first.id then time=0;&lt;/P&gt;&lt;P&gt;if event1=1 and time=0 then do;&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;time=1;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;if last.id and time=0 then output;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc lifetest data=_temp plots(s) graphics notable;&lt;/P&gt;&lt;P&gt;time time1*event1(0);&lt;/P&gt;&lt;P&gt;weight weight;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Oct 2018 20:12:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-omit-one-level-variable-from-Kaplan-Meier-Graphic/m-p/506597#M1362</guid>
      <dc:creator>MFraga</dc:creator>
      <dc:date>2018-10-22T20:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to omit one level variable from Kaplan-Meier Graphic</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-omit-one-level-variable-from-Kaplan-Meier-Graphic/m-p/506600#M1363</link>
      <description>If you want estimates for everything but the graph to be different then you'll likely have to do it externally using SGPLOT. You can capture the output and graph only elements you're interested in.</description>
      <pubDate>Mon, 22 Oct 2018 20:21:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-omit-one-level-variable-from-Kaplan-Meier-Graphic/m-p/506600#M1363</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-10-22T20:21:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to omit one level variable from Kaplan-Meier Graphic</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-omit-one-level-variable-from-Kaplan-Meier-Graphic/m-p/506663#M1370</link>
      <description>&lt;P&gt;Could you give an example of how&amp;nbsp;I&lt;SPAN&gt;&amp;nbsp;capture the output and graph only elements I am interested in for the "independent_v2", for example?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Oct 2018 20:54:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-omit-one-level-variable-from-Kaplan-Meier-Graphic/m-p/506663#M1370</guid>
      <dc:creator>MFraga</dc:creator>
      <dc:date>2018-10-22T20:54:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to omit one level variable from Kaplan-Meier Graphic</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-omit-one-level-variable-from-Kaplan-Meier-Graphic/m-p/506664#M1371</link>
      <description>&lt;P&gt;Full code is here, except add a WHERE option on your data to filter out the categories you don't want to include.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/graphicallyspeaking/2014/02/09/survival-plot/" target="_blank"&gt;https://blogs.sas.com/content/graphicallyspeaking/2014/02/09/survival-plot/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=SurvivalPlotData (where = (group not in (list of types to exclude)));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;At Risk table is optional obviously.&amp;nbsp;&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/236673"&gt;@MFraga&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Could you give an example of how&amp;nbsp;I&lt;SPAN&gt;&amp;nbsp;capture the output and graph only elements I am interested in for the "independent_v2", for example?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you!&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Oct 2018 20:57:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-omit-one-level-variable-from-Kaplan-Meier-Graphic/m-p/506664#M1371</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-10-22T20:57:51Z</dc:date>
    </item>
  </channel>
</rss>

