<?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 program code verification in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/program-code-verification/m-p/798328#M81614</link>
    <description>&lt;P&gt;Dear community, As a beginner in this community I would request a help. is the code for the question&lt;/P&gt;&lt;P&gt;" What is the mean value of the Sales variable for observations in the “Middle” group? Round&lt;BR /&gt;your answer to the nearest whole number. " correct or please suggest any modification.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc means data= work.shoesrange nolabels mean;&lt;BR /&gt;class salesrange;&lt;BR /&gt;run;&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>Thu, 24 Feb 2022 07:42:06 GMT</pubDate>
    <dc:creator>sas_learner_NEW</dc:creator>
    <dc:date>2022-02-24T07:42:06Z</dc:date>
    <item>
      <title>program code verification</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/program-code-verification/m-p/798328#M81614</link>
      <description>&lt;P&gt;Dear community, As a beginner in this community I would request a help. is the code for the question&lt;/P&gt;&lt;P&gt;" What is the mean value of the Sales variable for observations in the “Middle” group? Round&lt;BR /&gt;your answer to the nearest whole number. " correct or please suggest any modification.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc means data= work.shoesrange nolabels mean;&lt;BR /&gt;class salesrange;&lt;BR /&gt;run;&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>Thu, 24 Feb 2022 07:42:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/program-code-verification/m-p/798328#M81614</guid>
      <dc:creator>sas_learner_NEW</dc:creator>
      <dc:date>2022-02-24T07:42:06Z</dc:date>
    </item>
    <item>
      <title>Re: program code verification</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/program-code-verification/m-p/798329#M81615</link>
      <description>&lt;P&gt;I can't see your data, so I can only guess that the "Middle" group is in the salesrange variables.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In that case, yes, your code is fine and will give you the mean value for the&amp;nbsp;"Middle" group in the Results Viewer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could specify the MAXDEC Option in the Proc Means Statement to specify the desired number of decimals.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Feb 2022 07:46:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/program-code-verification/m-p/798329#M81615</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2022-02-24T07:46:30Z</dc:date>
    </item>
    <item>
      <title>Re: program code verification</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/program-code-verification/m-p/798330#M81616</link>
      <description>&lt;P&gt;Since you only want one group, you should restrict the observations to that group.&lt;/P&gt;
&lt;P&gt;You also want only one variable averaged, so you should tell the procedure that.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data=shoesrange nolabels mean;
where salesrange = "Middle"; /* if "Middle" is in fact the result of a custom format applied to salesrange, this must be adapted */
var sales;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Alternatively, you can use SQL:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
select avg(sales) as average_sales
from shoesrange
where salesrange = "Middle";
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 24 Feb 2022 07:57:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/program-code-verification/m-p/798330#M81616</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-02-24T07:57:12Z</dc:date>
    </item>
    <item>
      <title>Re: program code verification</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/program-code-verification/m-p/798367#M81618</link>
      <description>&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Thu, 24 Feb 2022 12:22:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/program-code-verification/m-p/798367#M81618</guid>
      <dc:creator>sas_learner_NEW</dc:creator>
      <dc:date>2022-02-24T12:22:15Z</dc:date>
    </item>
  </channel>
</rss>

