<?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: Different means between PROC MEANS and EXCEL in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Different-means-between-PROC-MEANS-and-EXCEL/m-p/585402#M166937</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/98381"&gt;@somebody&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I am not sure what I did wrong but I have different values between using PROC MEANS and excel. Although the difference is not large, it could be troublesome.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Please tell us what mean was calculated by SAS and what mean was calculated by Excel. We need to have some idea of the magnitude of the difference; some differences are round-off error and not worth pursuing.&lt;/P&gt;</description>
    <pubDate>Sat, 31 Aug 2019 11:53:19 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2019-08-31T11:53:19Z</dc:date>
    <item>
      <title>Different means between PROC MEANS and EXCEL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Different-means-between-PROC-MEANS-and-EXCEL/m-p/585394#M166934</link>
      <description>&lt;P&gt;I am not sure what I did wrong but I have different values between using PROC MEANS and excel. Although the difference is not large, it could be troublesome.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data = example noprint; by date portfolio;
    output out = test(drop=_TYPE_ _FREQ_ form_Date) mean()=;
run;&lt;BR /&gt;I&amp;nbsp;attached&amp;nbsp;the&amp;nbsp;data&amp;nbsp;and&amp;nbsp;the&amp;nbsp;comparison&amp;nbsp;between&amp;nbsp;the&amp;nbsp;means.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 31 Aug 2019 06:55:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Different-means-between-PROC-MEANS-and-EXCEL/m-p/585394#M166934</guid>
      <dc:creator>somebody</dc:creator>
      <dc:date>2019-08-31T06:55:47Z</dc:date>
    </item>
    <item>
      <title>Re: Different means between PROC MEANS and EXCEL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Different-means-between-PROC-MEANS-and-EXCEL/m-p/585396#M166935</link>
      <description>&lt;P&gt;How did you read the csv into SAS? Please post that code, so we can faithfully recreate your dataset.&lt;/P&gt;</description>
      <pubDate>Sat, 31 Aug 2019 07:22:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Different-means-between-PROC-MEANS-and-EXCEL/m-p/585396#M166935</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-08-31T07:22:30Z</dc:date>
    </item>
    <item>
      <title>Re: Different means between PROC MEANS and EXCEL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Different-means-between-PROC-MEANS-and-EXCEL/m-p/585402#M166937</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/98381"&gt;@somebody&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I am not sure what I did wrong but I have different values between using PROC MEANS and excel. Although the difference is not large, it could be troublesome.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Please tell us what mean was calculated by SAS and what mean was calculated by Excel. We need to have some idea of the magnitude of the difference; some differences are round-off error and not worth pursuing.&lt;/P&gt;</description>
      <pubDate>Sat, 31 Aug 2019 11:53:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Different-means-between-PROC-MEANS-and-EXCEL/m-p/585402#M166937</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-08-31T11:53:19Z</dc:date>
    </item>
    <item>
      <title>Re: Different means between PROC MEANS and EXCEL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Different-means-between-PROC-MEANS-and-EXCEL/m-p/585412#M166940</link>
      <description>&lt;P&gt;Excel does funny stuff to your numbers.&amp;nbsp; are you sure those results are correct that Excel provides.&amp;nbsp; Did you use a calculator, to confirm both results?&lt;/P&gt;</description>
      <pubDate>Sat, 31 Aug 2019 14:02:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Different-means-between-PROC-MEANS-and-EXCEL/m-p/585412#M166940</guid>
      <dc:creator>VDD</dc:creator>
      <dc:date>2019-08-31T14:02:16Z</dc:date>
    </item>
    <item>
      <title>Re: Different means between PROC MEANS and EXCEL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Different-means-between-PROC-MEANS-and-EXCEL/m-p/585416#M166942</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Another consideration is that you are not controlling for MAXDEC in the PROC MEANS code, so there could be rounding differences. Finally, and more to the point, I think is that you have 2 BY variables in your PROC MEANS code. PROC MEANS will treat each BY group as being one isolated group, based on your 2 BY variables. I do not know whether you can replicate that kind of BY group processing with Excel.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Without data to test, no one can do more than make general suggestions.&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Sat, 31 Aug 2019 15:37:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Different-means-between-PROC-MEANS-and-EXCEL/m-p/585416#M166942</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2019-08-31T15:37:26Z</dc:date>
    </item>
    <item>
      <title>Re: Different means between PROC MEANS and EXCEL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Different-means-between-PROC-MEANS-and-EXCEL/m-p/585454#M166959</link>
      <description>&lt;P&gt;The data posted is a subset of a larger dataset in SAS. I export this subset to csv so I can provide an example&lt;/P&gt;</description>
      <pubDate>Sun, 01 Sep 2019 06:55:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Different-means-between-PROC-MEANS-and-EXCEL/m-p/585454#M166959</guid>
      <dc:creator>somebody</dc:creator>
      <dc:date>2019-09-01T06:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: Different means between PROC MEANS and EXCEL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Different-means-between-PROC-MEANS-and-EXCEL/m-p/585455#M166960</link>
      <description>&lt;P&gt;In the "example_results.xlsx" file, column "excel_MEAN" contains means computed by Excel by using the formula AVERAGE().&lt;/P&gt;&lt;P&gt;Column SAS_MEAN contains means computed by SAS.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The 2 variables of interest are : r and tvol which are contained in column _NAME_.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 01 Sep 2019 07:05:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Different-means-between-PROC-MEANS-and-EXCEL/m-p/585455#M166960</guid>
      <dc:creator>somebody</dc:creator>
      <dc:date>2019-09-01T07:05:24Z</dc:date>
    </item>
    <item>
      <title>Re: Different means between PROC MEANS and EXCEL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Different-means-between-PROC-MEANS-and-EXCEL/m-p/585457#M166961</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;In the "example_results.xlsx" file, column "excel_MEAN" contains means computed by Excel by using the formula AVERAGE().&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Some of use refuse to download or open Excel or other Microsoft Office files as they are a security threat.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So please post as text the two answers&lt;/P&gt;</description>
      <pubDate>Sun, 01 Sep 2019 11:41:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Different-means-between-PROC-MEANS-and-EXCEL/m-p/585457#M166961</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-09-01T11:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: Different means between PROC MEANS and EXCEL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Different-means-between-PROC-MEANS-and-EXCEL/m-p/585492#M166968</link>
      <description>&lt;P&gt;Those difference look like round-off errors.&amp;nbsp; although both SAS and Excel use double precision FLOATING POINT arithmetic, you can get round-off errors when the numerator N is large.&lt;/P&gt;</description>
      <pubDate>Sun, 01 Sep 2019 19:59:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Different-means-between-PROC-MEANS-and-EXCEL/m-p/585492#M166968</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2019-09-01T19:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: Different means between PROC MEANS and EXCEL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Different-means-between-PROC-MEANS-and-EXCEL/m-p/585712#M167101</link>
      <description>&lt;P&gt;I opened the csv in Excel and LibreOffice Calc, and used the mean() function in both to calculate the means of the 6 observations for date 200001, portfolio 1. The result matches &lt;EM&gt;exactly&lt;/EM&gt; with the result in SAS. I guess that the other groups will be the same.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How did you calculate the means in Excel?&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2019 07:51:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Different-means-between-PROC-MEANS-and-EXCEL/m-p/585712#M167101</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-09-03T07:51:21Z</dc:date>
    </item>
  </channel>
</rss>

