<?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: Exclude missing values from calculating mean of records for a variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Exclude-missing-values-from-calculating-mean-of-records-for-a/m-p/555982#M154809</link>
    <description>&lt;P&gt;Thanks for catching my typo &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Same result, but I edited my comment.&lt;/P&gt;</description>
    <pubDate>Fri, 03 May 2019 15:38:49 GMT</pubDate>
    <dc:creator>noling</dc:creator>
    <dc:date>2019-05-03T15:38:49Z</dc:date>
    <item>
      <title>Exclude missing values from calculating mean of records for a variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exclude-missing-values-from-calculating-mean-of-records-for-a/m-p/555972#M154804</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following code below but is there a line that I could include so that I would be able to get the &lt;FONT color="#FF0000"&gt;&lt;U&gt;mean&lt;/U&gt; &lt;/FONT&gt;of all of the records for the 'PROV' variable, &lt;FONT color="#FF0000"&gt;&lt;U&gt;excluding all of the missing values for that variable&lt;/U&gt;&lt;/FONT&gt; when calculating the mean? Would this be possible without deleting the record at the start as I would like to preserve all of the data in the dataset? Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data April_analysis;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; set card_v_2019;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc means data=April_analysis mean SUM MAXDEC=2 ;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;var PROV;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;output out=PROVISION_BALANCE_MEAN;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2019 15:21:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exclude-missing-values-from-calculating-mean-of-records-for-a/m-p/555972#M154804</guid>
      <dc:creator>jeremy4</dc:creator>
      <dc:date>2019-05-03T15:21:21Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude missing values from calculating mean of records for a variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exclude-missing-values-from-calculating-mean-of-records-for-a/m-p/555973#M154805</link>
      <description>&lt;P&gt;SAS dpes that automatically.&amp;nbsp; If you were to ask for a few more statistics on the PROC MEANS line, you might be able to see that more clearly:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data=April_analysis mean SUM N NMISS MAXDEC=2 ;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 03 May 2019 15:23:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exclude-missing-values-from-calculating-mean-of-records-for-a/m-p/555973#M154805</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2019-05-03T15:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude missing values from calculating mean of records for a variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exclude-missing-values-from-calculating-mean-of-records-for-a/m-p/555974#M154806</link>
      <description>&lt;P&gt;Ex these give the same result:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data temp;
	value = 1;
	output;
	value =2;
	output;
run;
proc means data=temp mean;
	var value;
run;
data temp2;
	value = 1;
	output;
	value =2;
	output;
	value=.;
	output;
run;
proc means data=temp2 mean;
	var value;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 03 May 2019 15:38:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exclude-missing-values-from-calculating-mean-of-records-for-a/m-p/555974#M154806</guid>
      <dc:creator>noling</dc:creator>
      <dc:date>2019-05-03T15:38:25Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude missing values from calculating mean of records for a variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exclude-missing-values-from-calculating-mean-of-records-for-a/m-p/555980#M154807</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/115150"&gt;@noling&lt;/a&gt; you are doing mean on the same temp dataset&amp;nbsp;&lt;/P&gt;
&lt;P&gt;try this&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data temp;
	value = 1;
	output;
	value =2;
	output;
run;
proc means data=temp mean;
	var value;
run;
data temp2;
	value = 1;
	output;
	
	value =4;
	output;
	value=.;
	output;
run;
proc means data=temp2 mean;
	var value;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 03 May 2019 15:36:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exclude-missing-values-from-calculating-mean-of-records-for-a/m-p/555980#M154807</guid>
      <dc:creator>VDD</dc:creator>
      <dc:date>2019-05-03T15:36:04Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude missing values from calculating mean of records for a variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exclude-missing-values-from-calculating-mean-of-records-for-a/m-p/555982#M154809</link>
      <description>&lt;P&gt;Thanks for catching my typo &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Same result, but I edited my comment.&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2019 15:38:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exclude-missing-values-from-calculating-mean-of-records-for-a/m-p/555982#M154809</guid>
      <dc:creator>noling</dc:creator>
      <dc:date>2019-05-03T15:38:49Z</dc:date>
    </item>
  </channel>
</rss>

