<?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 sql average vs proc means; in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Proc-sql-average-vs-proc-means/m-p/465505#M70561</link>
    <description>&lt;P&gt;Since &lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/proc/n026epq8bpz1f9n10oeb7zen7s1e.htm" target="_self"&gt;proc mean's missing option only concerns missing class variables&lt;/A&gt;, there would be no difference in using SQL's avg or proc means.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;It's not clear how you want to include missing. If you essentially want them treated as 0, it's easiest to recode them and summarize on that, or you can use the sum() / COUNT() of the total number of rows, which would include the missing in the denominator.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;A href="https://communities.sas.com/t5/user/viewprofilepage/user-id/178948" target="_blank"&gt;@Alass006&lt;/A&gt;&amp;nbsp;wrote:
&lt;P&gt;Hello there,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is a statement in stat proc means that I am trying to find the equivalence in proc sql average.&lt;/P&gt;
&lt;P&gt;If I want to compute the means and including missing values&lt;/P&gt;
&lt;P&gt;proc means= data mean missing;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;var y;&lt;/P&gt;
&lt;P&gt;output out=yout mean= Avg&amp;nbsp; std=SD;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sql;&lt;/P&gt;
&lt;P&gt;select *, avg(y)&lt;/P&gt;
&lt;P&gt;from data;&lt;/P&gt;
&lt;P&gt;quit.&lt;/P&gt;
&lt;P&gt;Is there any way to include a missing statement in proc sql ?&lt;/P&gt;
&lt;P&gt;Thanks in advance&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
    <pubDate>Mon, 16 Jun 2025 12:24:33 GMT</pubDate>
    <dc:creator>art297</dc:creator>
    <dc:date>2025-06-16T12:24:33Z</dc:date>
    <item>
      <title>Proc sql average vs proc means;</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-sql-average-vs-proc-means/m-p/465503#M70560</link>
      <description>&lt;P&gt;Hello there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is a statement in stat proc means that I am trying to find the equivalence in proc sql average.&lt;/P&gt;&lt;P&gt;If I want to compute the means and including missing values&lt;/P&gt;&lt;P&gt;proc means= data mean missing;&lt;/P&gt;&lt;P&gt;&amp;nbsp;var y;&lt;/P&gt;&lt;P&gt;output out=yout mean= Avg&amp;nbsp; std=SD;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;select *, avg(y)&lt;/P&gt;&lt;P&gt;from data;&lt;/P&gt;&lt;P&gt;quit.&lt;/P&gt;&lt;P&gt;Is there any way to include a missing statement in proc sql ?&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 May 2018 16:34:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-sql-average-vs-proc-means/m-p/465503#M70560</guid>
      <dc:creator>Alass006</dc:creator>
      <dc:date>2018-05-28T16:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql average vs proc means;</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-sql-average-vs-proc-means/m-p/465505#M70561</link>
      <description>&lt;P&gt;Since &lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/proc/n026epq8bpz1f9n10oeb7zen7s1e.htm" target="_self"&gt;proc mean's missing option only concerns missing class variables&lt;/A&gt;, there would be no difference in using SQL's avg or proc means.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;It's not clear how you want to include missing. If you essentially want them treated as 0, it's easiest to recode them and summarize on that, or you can use the sum() / COUNT() of the total number of rows, which would include the missing in the denominator.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;A href="https://communities.sas.com/t5/user/viewprofilepage/user-id/178948" target="_blank"&gt;@Alass006&lt;/A&gt;&amp;nbsp;wrote:
&lt;P&gt;Hello there,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is a statement in stat proc means that I am trying to find the equivalence in proc sql average.&lt;/P&gt;
&lt;P&gt;If I want to compute the means and including missing values&lt;/P&gt;
&lt;P&gt;proc means= data mean missing;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;var y;&lt;/P&gt;
&lt;P&gt;output out=yout mean= Avg&amp;nbsp; std=SD;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sql;&lt;/P&gt;
&lt;P&gt;select *, avg(y)&lt;/P&gt;
&lt;P&gt;from data;&lt;/P&gt;
&lt;P&gt;quit.&lt;/P&gt;
&lt;P&gt;Is there any way to include a missing statement in proc sql ?&lt;/P&gt;
&lt;P&gt;Thanks in advance&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Mon, 16 Jun 2025 12:24:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-sql-average-vs-proc-means/m-p/465505#M70561</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2025-06-16T12:24:33Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql average vs proc means;</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-sql-average-vs-proc-means/m-p/465506#M70562</link>
      <description>&lt;P&gt;And on a related note, the sample PROC MEANS that you posted would produce the same results, whether or not the MISSING option is present.&amp;nbsp; You might need to see a few examples of how MISSING affects the results ... as&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13711"&gt;@art297&lt;/a&gt;&amp;nbsp;mentioned, those examples will include a CLASS statement,.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just curious, how are you picturing that the results would change if missing values are included vs. excluded?&lt;/P&gt;</description>
      <pubDate>Mon, 28 May 2018 16:51:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-sql-average-vs-proc-means/m-p/465506#M70562</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-05-28T16:51:20Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql average vs proc means;</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-sql-average-vs-proc-means/m-p/465510#M70563</link>
      <description>&lt;P&gt;It's not clear how you want to include missing. If you essentially want them treated as 0, it's easiest to recode them and summarize on that, or you can use the sum() / COUNT() of the total number of rows, which would include the missing in the denominator.&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/178948"&gt;@Alass006&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello there,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is a statement in stat proc means that I am trying to find the equivalence in proc sql average.&lt;/P&gt;
&lt;P&gt;If I want to compute the means and including missing values&lt;/P&gt;
&lt;P&gt;proc means= data mean missing;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;var y;&lt;/P&gt;
&lt;P&gt;output out=yout mean= Avg&amp;nbsp; std=SD;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sql;&lt;/P&gt;
&lt;P&gt;select *, avg(y)&lt;/P&gt;
&lt;P&gt;from data;&lt;/P&gt;
&lt;P&gt;quit.&lt;/P&gt;
&lt;P&gt;Is there any way to include a missing statement in proc sql ?&lt;/P&gt;
&lt;P&gt;Thanks in advance&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 May 2018 17:16:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-sql-average-vs-proc-means/m-p/465510#M70563</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-05-28T17:16:50Z</dc:date>
    </item>
  </channel>
</rss>

