<?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 MEANS in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/PROC-MEANS/m-p/577510#M75514</link>
    <description>&lt;P&gt;There is a difference when missing values are present in your VAR variable or when you specify a FREQ variable. A simple example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
input f x;
datalines;
1   1
1   .
5   .
.   2
;

proc means data=test;
var x;
freq f;
output out=want n=n;
run;

proc print data=want; run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;                            Obs    _TYPE_    _FREQ_    n

                             1        0         7      1
&lt;/PRE&gt;</description>
    <pubDate>Mon, 29 Jul 2019 19:56:05 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2019-07-29T19:56:05Z</dc:date>
    <item>
      <title>PROC MEANS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-MEANS/m-p/577497#M75512</link>
      <description>&lt;P&gt;Is there any difference between the _freq_ variable and the N output statistic?&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2019 19:29:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-MEANS/m-p/577497#M75512</guid>
      <dc:creator>Quodly</dc:creator>
      <dc:date>2019-07-29T19:29:48Z</dc:date>
    </item>
    <item>
      <title>Re: PROC MEANS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-MEANS/m-p/577506#M75513</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/283289"&gt;@Quodly&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Is there any difference between the _freq_ variable and the N output statistic?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Yes, if you have missing values.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;N is the count of non missing, frequency is the count of all values.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NMISS+N = _FREQ_.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data class;
set sashelp.class;
if age in (13, 14, 15) then call missing(weight);
run;

proc means data=class;
class sex;
var weight;
output out=want sum= mean= N= NMISS=/ autoname;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 29 Jul 2019 19:45:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-MEANS/m-p/577506#M75513</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-07-29T19:45:35Z</dc:date>
    </item>
    <item>
      <title>Re: PROC MEANS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-MEANS/m-p/577510#M75514</link>
      <description>&lt;P&gt;There is a difference when missing values are present in your VAR variable or when you specify a FREQ variable. A simple example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
input f x;
datalines;
1   1
1   .
5   .
.   2
;

proc means data=test;
var x;
freq f;
output out=want n=n;
run;

proc print data=want; run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;                            Obs    _TYPE_    _FREQ_    n

                             1        0         7      1
&lt;/PRE&gt;</description>
      <pubDate>Mon, 29 Jul 2019 19:56:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-MEANS/m-p/577510#M75514</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-07-29T19:56:05Z</dc:date>
    </item>
  </channel>
</rss>

