<?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: treatment of missing values in proc sgplot in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/treatment-of-missing-values-in-proc-sgplot/m-p/641217#M19775</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/323617"&gt;@ratika2&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the SASHELP.HEART dataset, missing values for the DEATHCAUSE variable correspond to patients who are still alive.&amp;nbsp;So I am not sure that it makes sense to consider their DEATHCAUSE as 'Unknown'.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you still want to do that, I suggest that you write a DATA step first:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data heart;
	set sashelp.heart;
	if DeathCause="" then DeathCause="Unknown";
run;

proc sgplot data=heart;
	vbar DeathCause / group=Status groupdisplay=cluster;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But as I said, that doesn't make sense to me .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The use of the MISSING option would be more realistic:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=sashelp.heart;
	vbar DeathCause / group=Status groupdisplay=cluster missing;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture d’écran 2020-04-20 à 11.04.02.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/38447i1329CA1B62AA3932/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Capture d’écran 2020-04-20 à 11.04.02.png" alt="Capture d’écran 2020-04-20 à 11.04.02.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;</description>
    <pubDate>Mon, 20 Apr 2020 09:04:18 GMT</pubDate>
    <dc:creator>ed_sas_member</dc:creator>
    <dc:date>2020-04-20T09:04:18Z</dc:date>
    <item>
      <title>treatment of missing values in proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/treatment-of-missing-values-in-proc-sgplot/m-p/641202#M19774</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc sgplot data= sahelp.heart;&lt;BR /&gt;vbar cause_of_death(repalce &lt;STRONG&gt;missing="unknown"&lt;/STRONG&gt;) /&lt;BR /&gt;group= Status&lt;BR /&gt;groupdisplay=cluster&lt;BR /&gt;run;&lt;/PRE&gt;&lt;P&gt;'cause_of_dealth' column contains missing values which is not displayed as separate label. I need to &lt;STRONG&gt;replace missing values in cause_of_dealth by 'unknown' and then plot vertical bar graph&lt;/STRONG&gt;.But this code is not working. How to replace missing by unknown in this code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2020 07:43:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/treatment-of-missing-values-in-proc-sgplot/m-p/641202#M19774</guid>
      <dc:creator>ratika2</dc:creator>
      <dc:date>2020-04-20T07:43:43Z</dc:date>
    </item>
    <item>
      <title>Re: treatment of missing values in proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/treatment-of-missing-values-in-proc-sgplot/m-p/641217#M19775</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/323617"&gt;@ratika2&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the SASHELP.HEART dataset, missing values for the DEATHCAUSE variable correspond to patients who are still alive.&amp;nbsp;So I am not sure that it makes sense to consider their DEATHCAUSE as 'Unknown'.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you still want to do that, I suggest that you write a DATA step first:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data heart;
	set sashelp.heart;
	if DeathCause="" then DeathCause="Unknown";
run;

proc sgplot data=heart;
	vbar DeathCause / group=Status groupdisplay=cluster;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But as I said, that doesn't make sense to me .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The use of the MISSING option would be more realistic:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=sashelp.heart;
	vbar DeathCause / group=Status groupdisplay=cluster missing;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture d’écran 2020-04-20 à 11.04.02.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/38447i1329CA1B62AA3932/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Capture d’écran 2020-04-20 à 11.04.02.png" alt="Capture d’écran 2020-04-20 à 11.04.02.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2020 09:04:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/treatment-of-missing-values-in-proc-sgplot/m-p/641217#M19775</guid>
      <dc:creator>ed_sas_member</dc:creator>
      <dc:date>2020-04-20T09:04:18Z</dc:date>
    </item>
    <item>
      <title>Re: treatment of missing values in proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/treatment-of-missing-values-in-proc-sgplot/m-p/641251#M19776</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;thank you for the solution. I used heart data set just an example, for my different code.I have the&amp;nbsp; I need to give label 'unknown' to the missing values in vbar. How to label them, in the code below?&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc sgplot data=sashelp.heart;
vbar DeathCause / group=Status groupdisplay=cluster &lt;STRONG&gt;missing;&lt;/STRONG&gt;
run;&lt;/PRE&gt;&lt;P&gt;Thanks for the help&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2020 10:56:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/treatment-of-missing-values-in-proc-sgplot/m-p/641251#M19776</guid>
      <dc:creator>ratika2</dc:creator>
      <dc:date>2020-04-20T10:56:29Z</dc:date>
    </item>
  </channel>
</rss>

