<?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 output doesn't match results in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-means-output-doesn-t-match-results/m-p/170546#M13063</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My guess is rounding in the presentation, try changing the format of the data in the viewer or in a data step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data &lt;SPAN style="color: #000000; font-family: 'Courier New'; background-color: #ffffff;"&gt;ipdf_adults_mean_a&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;set &lt;SPAN style="color: #000000; font-family: 'Courier New'; background-color: #ffffff;"&gt;ipdf_adults_mean_a&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;format ip_count bh_ed_count 12.4;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;If you want a different structure for the table, look into the STACKODS output.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/proc/65145/HTML/default/viewer.htm#p17h6q7ygvkl1sn13qzf947dundi.htm" title="http://support.sas.com/documentation/cdl/en/proc/65145/HTML/default/viewer.htm#p17h6q7ygvkl1sn13qzf947dundi.htm"&gt;Base SAS(R) 9.3 Procedures Guide, Second Edition&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Jan 2015 16:51:10 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2015-01-06T16:51:10Z</dc:date>
    <item>
      <title>proc means output doesn't match results</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-means-output-doesn-t-match-results/m-p/170545#M13062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt;I'm generating mean and n statistics for two outcome variables, ip_count &amp;amp; bh_ed_count, by a third Yes/No categorical variable named "A" using proc means:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;means&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;=ipdf_adults &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;n&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;mean&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;where&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt; A in(&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: purple;"&gt;'Y'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: purple;"&gt;'N'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt; A;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt; ip_count bh_ed_count;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;output&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;out&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;=ipdf_adults_mean_a ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: arial,helvetica,sans-serif;"&gt;The results output listing for proc means is correct:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;--------------------------------------------------------------- A=N ----------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The MEANS Procedure&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variable Label N Mean&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ip_count IP_COUNT 186 &lt;STRONG&gt;0.6021505&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bh_ed_count BH_ED_COUNT 186&lt;STRONG&gt; 0.9301075&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--------------------------------------------------------------- A=Y ----------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variable Label N Mean&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ip_count IP_COUNT 54 &lt;STRONG&gt;0.5925926&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bh_ed_count BH_ED_COUNT 54 &lt;STRONG&gt;1.2407407&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: arial,helvetica,sans-serif;"&gt;However the output dataset incorrectly lists the mean values as 1:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="WIDTH: 435px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl64" height="20" width="56"&gt;A&lt;/TD&gt;&lt;TD class="xl64" width="63"&gt;_TYPE_&lt;/TD&gt;&lt;TD class="xl64" width="63"&gt;_FREQ_&lt;/TD&gt;&lt;TD class="xl64" width="63"&gt;_STAT_&lt;/TD&gt;&lt;TD class="xl64" width="81"&gt;ip_count&lt;/TD&gt;&lt;TD class="xl64" width="109"&gt;bh_ed_count&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;N&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;0&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;186&lt;/TD&gt;&lt;TD class="xl63"&gt;N&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;186&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;186&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;N&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;0&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;186&lt;/TD&gt;&lt;TD class="xl63"&gt;MIN&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;0&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;N&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;0&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;186&lt;/TD&gt;&lt;TD class="xl63"&gt;MAX&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;5&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;48&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;&lt;STRONG&gt;N&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;&lt;STRONG&gt;186&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl63"&gt;&lt;STRONG&gt;MEAN&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;N&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;0&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;186&lt;/TD&gt;&lt;TD class="xl63"&gt;STD&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;Y&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;0&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;54&lt;/TD&gt;&lt;TD class="xl63"&gt;N&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;54&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;54&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;Y&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;0&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;54&lt;/TD&gt;&lt;TD class="xl63"&gt;MIN&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;0&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;Y&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;0&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;54&lt;/TD&gt;&lt;TD class="xl63"&gt;MAX&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;4&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;9&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;&lt;STRONG&gt;Y&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;&lt;STRONG&gt;54&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl63"&gt;&lt;STRONG&gt;MEAN&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;Y&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;0&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;54&lt;/TD&gt;&lt;TD class="xl63"&gt;STD&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: arial,helvetica,sans-serif;"&gt;Any ideas what's going on here? Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2015 16:43:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-means-output-doesn-t-match-results/m-p/170545#M13062</guid>
      <dc:creator>RobF</dc:creator>
      <dc:date>2015-01-06T16:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: proc means output doesn't match results</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-means-output-doesn-t-match-results/m-p/170546#M13063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My guess is rounding in the presentation, try changing the format of the data in the viewer or in a data step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data &lt;SPAN style="color: #000000; font-family: 'Courier New'; background-color: #ffffff;"&gt;ipdf_adults_mean_a&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;set &lt;SPAN style="color: #000000; font-family: 'Courier New'; background-color: #ffffff;"&gt;ipdf_adults_mean_a&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;format ip_count bh_ed_count 12.4;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;If you want a different structure for the table, look into the STACKODS output.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/proc/65145/HTML/default/viewer.htm#p17h6q7ygvkl1sn13qzf947dundi.htm" title="http://support.sas.com/documentation/cdl/en/proc/65145/HTML/default/viewer.htm#p17h6q7ygvkl1sn13qzf947dundi.htm"&gt;Base SAS(R) 9.3 Procedures Guide, Second Edition&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2015 16:51:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-means-output-doesn-t-match-results/m-p/170546#M13063</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-01-06T16:51:10Z</dc:date>
    </item>
    <item>
      <title>Re: proc means output doesn't match results</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-means-output-doesn-t-match-results/m-p/170547#M13064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Reeza, that fixed the problem!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I can insert the format statement into proc means to save myself a step:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;means&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;=ipdf_adults &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;n&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;mean&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;format&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt; ip_count bh_ed_count &lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-family: 'Courier New';"&gt;12.4&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;where&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt; A in(&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: purple;"&gt;'Y'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: purple;"&gt;'N'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt; A;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt; ip_count bh_ed_count;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;output&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;out&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;=ipdf_adults_mean_a ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2015 17:24:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-means-output-doesn-t-match-results/m-p/170547#M13064</guid>
      <dc:creator>RobF</dc:creator>
      <dc:date>2015-01-06T17:24:49Z</dc:date>
    </item>
  </channel>
</rss>

