<?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 Error in SAS output? in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Error-in-SAS-output/m-p/746903#M29450</link>
    <description>&lt;P&gt;Hello all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have an original dataset which had 5 variables (alcohol_br1-alcohol_br5) which I have transposed the responses across all 5 variables into one column (COL1) in a new dataset. I ran a proc freq on this new column just to see what the values were in this column and I noticed that the frequency output will sometimes give me the same value multiple times but with different frequencies. I did a cross tab of the COL1 values by alcohol_br1-alcohol_br5 and the output below is an example of the output I get in SAS. I'm wondering if there's a reason why SAS would give the same value twice but with different frequencies? This occurs multiple times and I can't find any difference in the actual value in my dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 240pt;" border="0" width="320" cellspacing="0" cellpadding="0"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="64" height="20" class="xl65" style="height: 15.0pt; width: 48pt;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="64" class="xl65" style="border-left: none; width: 48pt;"&gt;Molson&lt;/TD&gt;
&lt;TD width="64" class="xl65" style="border-left: none; width: 48pt;"&gt;Bombay&lt;/TD&gt;
&lt;TD width="64" class="xl65" style="border-left: none; width: 48pt;"&gt;Stella artois&lt;/TD&gt;
&lt;TD width="64" class="xl65" style="border-left: none; width: 48pt;"&gt;Molson&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl65" style="height: 15.0pt; border-top: none;"&gt;alcohol_br1&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;7&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;65&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;599&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl65" style="height: 15.0pt; border-top: none;"&gt;alcohol_br2&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;23&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;4&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl65" style="height: 15.0pt; border-top: none;"&gt;alcohol_br3&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;90&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl65" style="height: 15.0pt; border-top: none;"&gt;alcohol_br4&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;3&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl65" style="height: 15.0pt; border-top: none;"&gt;alcohol_br5&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;6&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
    <pubDate>Wed, 09 Jun 2021 21:18:16 GMT</pubDate>
    <dc:creator>monsterpie</dc:creator>
    <dc:date>2021-06-09T21:18:16Z</dc:date>
    <item>
      <title>Error in SAS output?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Error-in-SAS-output/m-p/746903#M29450</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have an original dataset which had 5 variables (alcohol_br1-alcohol_br5) which I have transposed the responses across all 5 variables into one column (COL1) in a new dataset. I ran a proc freq on this new column just to see what the values were in this column and I noticed that the frequency output will sometimes give me the same value multiple times but with different frequencies. I did a cross tab of the COL1 values by alcohol_br1-alcohol_br5 and the output below is an example of the output I get in SAS. I'm wondering if there's a reason why SAS would give the same value twice but with different frequencies? This occurs multiple times and I can't find any difference in the actual value in my dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 240pt;" border="0" width="320" cellspacing="0" cellpadding="0"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="64" height="20" class="xl65" style="height: 15.0pt; width: 48pt;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="64" class="xl65" style="border-left: none; width: 48pt;"&gt;Molson&lt;/TD&gt;
&lt;TD width="64" class="xl65" style="border-left: none; width: 48pt;"&gt;Bombay&lt;/TD&gt;
&lt;TD width="64" class="xl65" style="border-left: none; width: 48pt;"&gt;Stella artois&lt;/TD&gt;
&lt;TD width="64" class="xl65" style="border-left: none; width: 48pt;"&gt;Molson&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl65" style="height: 15.0pt; border-top: none;"&gt;alcohol_br1&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;7&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;65&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;599&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl65" style="height: 15.0pt; border-top: none;"&gt;alcohol_br2&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;23&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;4&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl65" style="height: 15.0pt; border-top: none;"&gt;alcohol_br3&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;90&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl65" style="height: 15.0pt; border-top: none;"&gt;alcohol_br4&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;3&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl65" style="height: 15.0pt; border-top: none;"&gt;alcohol_br5&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;6&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Wed, 09 Jun 2021 21:18:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Error-in-SAS-output/m-p/746903#M29450</guid>
      <dc:creator>monsterpie</dc:creator>
      <dc:date>2021-06-09T21:18:16Z</dc:date>
    </item>
    <item>
      <title>Re: Error in SAS output?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Error-in-SAS-output/m-p/746904#M29451</link>
      <description>&lt;P&gt;We need to see your original data (&lt;A href="https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/" target="_self"&gt;instructions for providing data&lt;/A&gt;; do not provide data as a file attachment or as a screen capture), and your code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please explain in more detail:&lt;/P&gt;
&lt;P&gt;"...and I noticed that the frequency output will sometimes give me the same value multiple times but with different frequencies."&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jun 2021 21:22:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Error-in-SAS-output/m-p/746904#M29451</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-06-09T21:22:12Z</dc:date>
    </item>
    <item>
      <title>Re: Error in SAS output?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Error-in-SAS-output/m-p/746909#M29452</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/318138"&gt;@monsterpie&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have an original dataset which had 5 variables (alcohol_br1-alcohol_br5) which I have transposed the responses across all 5 variables into one column (COL1) in a new dataset. I ran a proc freq on this new column just to see what the values were in this column and I noticed that the frequency output will sometimes give me the same value multiple times but with different frequencies. I did a cross tab of the COL1 values by alcohol_br1-alcohol_br5 and the output below is an example of the output I get in SAS. I'm wondering if there's a reason why SAS would give the same value twice but with different frequencies? This occurs multiple times and I can't find any difference in the actual value in my dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 240pt;" border="0" width="320" cellspacing="0" cellpadding="0"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="64" height="20" class="xl65" style="height: 15.0pt; width: 48pt;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="64" class="xl65" style="border-left: none; width: 48pt;"&gt;Molson&lt;/TD&gt;
&lt;TD width="64" class="xl65" style="border-left: none; width: 48pt;"&gt;Bombay&lt;/TD&gt;
&lt;TD width="64" class="xl65" style="border-left: none; width: 48pt;"&gt;Stella artois&lt;/TD&gt;
&lt;TD width="64" class="xl65" style="border-left: none; width: 48pt;"&gt;Molson&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl65" style="height: 15.0pt; border-top: none;"&gt;alcohol_br1&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;7&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;65&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;599&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl65" style="height: 15.0pt; border-top: none;"&gt;alcohol_br2&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;23&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;4&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl65" style="height: 15.0pt; border-top: none;"&gt;alcohol_br3&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;90&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl65" style="height: 15.0pt; border-top: none;"&gt;alcohol_br4&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;3&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl65" style="height: 15.0pt; border-top: none;"&gt;alcohol_br5&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;6&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You don't show anything resembling "col1" so not sure what the above represents in terms of your question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the "value" you reference appearing multiple times it is possibly a character variable with leading blanks, which get reformatted in the layout of proc freq to appear the same. See below for an example:&lt;/P&gt;
&lt;PRE&gt;data example;
   length value $ 10.;
   value='abc';
   do i= 1 to 5;
      output;
      value=cat(' ',value);
   end;
   output;
run;


proc freq data=example;
   tables value;
run;&lt;/PRE&gt;
&lt;P&gt;If you look at the data set Example created above you will see that the variable value has different numbers of leading spaces in front of the value 'abc'. So Proc Freq &lt;STRONG&gt;counts&lt;/STRONG&gt; them as different. However the way the output table generator works the values are all left justified and &lt;STRONG&gt;look&lt;/STRONG&gt; the same. Proc Print will do the same thing. You need to look at the data with another proc like Report where the style override ASIS will suppress the behavior of removing leading spaces.&lt;/P&gt;
&lt;PRE&gt;proc report data=example;
   column value;
   define value / display style=[asis=yes];
run;&lt;/PRE&gt;</description>
      <pubDate>Wed, 09 Jun 2021 21:53:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Error-in-SAS-output/m-p/746909#M29452</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-06-09T21:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: Error in SAS output?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Error-in-SAS-output/m-p/747000#M29457</link>
      <description>&lt;P&gt;Or just look at the plain old text output.&lt;/P&gt;
&lt;PRE&gt;The FREQ Procedure

                                     Cumulative    Cumulative
value       Frequency     Percent     Frequency      Percent
-------------------------------------------------------------
     abc           1       16.67             1        16.67
    abc            1       16.67             2        33.33
   abc             1       16.67             3        50.00
  abc              1       16.67             4        66.67
 abc               1       16.67             5        83.33
abc                1       16.67             6       100.00
&lt;/PRE&gt;
&lt;P&gt;Instead of the "pretty" ODS output.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 453px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/60208iC35106637EB975FF/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jun 2021 12:19:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Error-in-SAS-output/m-p/747000#M29457</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-06-10T12:19:39Z</dc:date>
    </item>
  </channel>
</rss>

