<?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: Finding average of x and y for each group in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Finding-average-of-x-and-y-for-each-group/m-p/651632#M195534</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;the "&lt;SPAN&gt;ERROR: Variable y in list does not match type prescribed for this list." sounds like `y` isn't numeric. Try for example something like:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;yNew = input(y, best32.);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;to convert character to numeric and try to rerun proc means with `var x yNew.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;All the best&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Bart&lt;/SPAN&gt;&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>Fri, 29 May 2020 06:45:26 GMT</pubDate>
    <dc:creator>yabwon</dc:creator>
    <dc:date>2020-05-29T06:45:26Z</dc:date>
    <item>
      <title>Finding average of x and y for each group</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-average-of-x-and-y-for-each-group/m-p/651611#M195524</link>
      <description>&lt;P&gt;Hello, upon a question in a practice exam, I am stumped on this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Open the existing program,&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;program48.sas&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;from folder&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;C:\cert\errors&lt;/STRONG&gt;&lt;SPAN&gt;.&amp;nbsp;At any time, you may save your corrected program as&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;program48&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;in&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;C:\cert\programs&lt;/STRONG&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This program is intended to:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;Create 3 groups for&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Cvar&lt;/STRONG&gt;&lt;SPAN&gt;: A-G is&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Group=&lt;/STRONG&gt;&lt;SPAN&gt;1; H-N is&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Group=&lt;/STRONG&gt;&lt;SPAN&gt;2; O-Z is&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Group=3&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;All variations of the variable should be in the same group, i.e. “A” and “a” should be in&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Group=&lt;/STRONG&gt;&lt;SPAN&gt;1.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;Calculate the average of&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;X&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;and&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Y&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;by&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Group&lt;/STRONG&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;Here is my code below:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;data groups;
set cert.input48;
if upcase(cvar) in ('A','B','C','D','E','F','G') then group=1;
else if upcase(cvar) in ('H','I','J','K','L','M','N') then group=2;
else group=3;
format y 10.;
run;

/* Calculate the average of X and Y by Group */
/* What is the average of X and Y for Group 2? */

proc means data=groups MEAN maxdec=2;
class group;
var x y;
run;&lt;/PRE&gt;&lt;P&gt;Upon running this, I get:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;DIV class="sasSource"&gt;1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;72&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;73 proc means data=groups MEAN maxdec=2;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;74 class group;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;75 var x y;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: Variable y in list does not match type prescribed for this list.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;76 run;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: PROCEDURE MEANS used (Total process time):&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;real time 0.00 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;cpu time 0.00 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;77&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;78&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;79 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;91&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I've tried converting y to numeric but I do not know if this was the right move. Any help is appreciated. Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 May 2020 01:50:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-average-of-x-and-y-for-each-group/m-p/651611#M195524</guid>
      <dc:creator>J_Moose</dc:creator>
      <dc:date>2020-05-29T01:50:23Z</dc:date>
    </item>
    <item>
      <title>Re: Finding average of x and y for each group</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-average-of-x-and-y-for-each-group/m-p/651616#M195525</link>
      <description>&lt;P&gt;I have not seen the data, but assuming x and y are numeric.&amp;nbsp; do a proc contents to check.&amp;nbsp;&amp;nbsp;&lt;CODE class=" language-sas"&gt;Untested code!&lt;/CODE&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; &lt;BR /&gt;proc format;
value $cvar  
'A','B','C','D','E','F','G'=1
'H','I','J','K','L','M','N'=2;
other=3;
run;
proc summary nway data=cert.input48;
class cvar;
var x y;
output=avgs 
	mean=;
	format cvar $cvar. x y 10.;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 May 2020 02:37:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-average-of-x-and-y-for-each-group/m-p/651616#M195525</guid>
      <dc:creator>ghosh</dc:creator>
      <dc:date>2020-05-29T02:37:23Z</dc:date>
    </item>
    <item>
      <title>Re: Finding average of x and y for each group</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-average-of-x-and-y-for-each-group/m-p/651632#M195534</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;the "&lt;SPAN&gt;ERROR: Variable y in list does not match type prescribed for this list." sounds like `y` isn't numeric. Try for example something like:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;yNew = input(y, best32.);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;to convert character to numeric and try to rerun proc means with `var x yNew.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;All the best&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Bart&lt;/SPAN&gt;&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>Fri, 29 May 2020 06:45:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-average-of-x-and-y-for-each-group/m-p/651632#M195534</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2020-05-29T06:45:26Z</dc:date>
    </item>
    <item>
      <title>Re: Finding average of x and y for each group</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-average-of-x-and-y-for-each-group/m-p/651659#M195546</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/328154"&gt;@J_Moose&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need to convert y, which is an character variable, to a numeric one.&lt;/P&gt;
&lt;P&gt;To do that, you just need to compute another variable (y2) which the "numeric" equivalent:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;y2 = input(y,best.);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And then adapt the PROC MEANS to use the new numeric variable y2&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data=groups mean maxdec=2;
class group;
var x y2;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 May 2020 08:12:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-average-of-x-and-y-for-each-group/m-p/651659#M195546</guid>
      <dc:creator>ed_sas_member</dc:creator>
      <dc:date>2020-05-29T08:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: Finding average of x and y for each group</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-average-of-x-and-y-for-each-group/m-p/651741#M195569</link>
      <description>&lt;P&gt;This bit of code&lt;/P&gt;
&lt;PRE&gt;if upcase(cvar) in ('A','B','C','D','E','F','G') then group=1;
else if upcase(cvar) in ('H','I','J','K','L','M','N') then group=2;
else group=3;&lt;/PRE&gt;
&lt;P&gt;Is&amp;nbsp;&lt;STRONG&gt;not&lt;/STRONG&gt; equivalent to: &lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN&gt;Create 3 groups for&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Cvar&lt;/STRONG&gt;&lt;SPAN&gt;: A-G is&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Group=&lt;/STRONG&gt;&lt;SPAN&gt;1; H-N is&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Group=&lt;/STRONG&gt;&lt;SPAN&gt;2; O-Z is&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Group=3&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Reason: missing values or any non-letter character would be assigned to group 3. The instructions say only the letters O to Z.&lt;/P&gt;
&lt;P&gt;If I were grading an assignment with this you would get a deduction because of that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One of the obnoxious things about dealing with some data sources is that they can change on you. The first set you get this might work with no missing and only letter values but the next time you might find other values. Be very careful that you &lt;STRONG&gt;know&lt;/STRONG&gt; the contents of your data and the rules when dropping all other records into an "else" assignment. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 May 2020 14:29:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-average-of-x-and-y-for-each-group/m-p/651741#M195569</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-05-29T14:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: Finding average of x and y for each group</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-average-of-x-and-y-for-each-group/m-p/651771#M195576</link>
      <description>&lt;P&gt;I will modify my previously suggested code based on the point&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;made.&amp;nbsp; Convert the char value to their byte values&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;* Untested code;&lt;BR /&gt;
data test;
  set cert.input48;
    nvar=rank(cvar);
    if isnumber(x) then;
    xn=input(x,best.);  else call missing(xn);    
    if isnumber(y) then;
    yn=input(y,best.);  else call missing(yn);
 run;
 proc format;
   value nvarf 
   71-97, 97-103='1'
   72-78,104-110='2'
   79-90,111-122='3'
   other='.';
   run;

proc summary nway data=test;
class nvar;
var x y;
output=avgs 
	mean=;
	format nvar nvarf. xn yn 10.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 30 May 2020 13:06:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-average-of-x-and-y-for-each-group/m-p/651771#M195576</guid>
      <dc:creator>ghosh</dc:creator>
      <dc:date>2020-05-30T13:06:08Z</dc:date>
    </item>
    <item>
      <title>Re: Finding average of x and y for each group</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-average-of-x-and-y-for-each-group/m-p/651965#M195662</link>
      <description>&lt;P&gt;Hi ghosh,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I run this code, primarily in the proc format function it tells me that "Start is greater than end: 97-71".&lt;/P&gt;</description>
      <pubDate>Sat, 30 May 2020 12:37:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-average-of-x-and-y-for-each-group/m-p/651965#M195662</guid>
      <dc:creator>J_Moose</dc:creator>
      <dc:date>2020-05-30T12:37:13Z</dc:date>
    </item>
    <item>
      <title>Re: Finding average of x and y for each group</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-average-of-x-and-y-for-each-group/m-p/651966#M195663</link>
      <description>&lt;P&gt;Hi ballardw,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions on how to improve this within the code? Thank you for pointing this out!&lt;/P&gt;</description>
      <pubDate>Sat, 30 May 2020 12:38:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-average-of-x-and-y-for-each-group/m-p/651966#M195663</guid>
      <dc:creator>J_Moose</dc:creator>
      <dc:date>2020-05-30T12:38:29Z</dc:date>
    </item>
    <item>
      <title>Re: Finding average of x and y for each group</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-average-of-x-and-y-for-each-group/m-p/651968#M195665</link>
      <description>&lt;P&gt;oops typo, just reverse them. Not having the data I had no way to test the code. They are simply the numerical values of the alphabet&lt;/P&gt;</description>
      <pubDate>Sat, 30 May 2020 12:46:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-average-of-x-and-y-for-each-group/m-p/651968#M195665</guid>
      <dc:creator>ghosh</dc:creator>
      <dc:date>2020-05-30T12:46:16Z</dc:date>
    </item>
    <item>
      <title>Re: Finding average of x and y for each group</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-average-of-x-and-y-for-each-group/m-p/694007#M211628</link>
      <description>this is a very nice and keen observation many thanks</description>
      <pubDate>Sat, 24 Oct 2020 15:09:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-average-of-x-and-y-for-each-group/m-p/694007#M211628</guid>
      <dc:creator>himself</dc:creator>
      <dc:date>2020-10-24T15:09:28Z</dc:date>
    </item>
    <item>
      <title>Re: Finding average of x and y for each group</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-average-of-x-and-y-for-each-group/m-p/694009#M211630</link>
      <description>&lt;P&gt;Hi can try this hope it will solve the question&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data groups(rename=(y2=y));
set cert.input48;
if upcase(cvar) in ('A','B','C','D','E','F','G') then group=1;
else if upcase(cvar) in ('H','I','J','K','L','M','N') then group=2;
else group=3;
y2 = input(y,best.);
drop y;
run;

proc means data=groups mean maxdec=2 noprint;
class group;
var x y;
output out=progy48(drop=_type_ _freq_)  mean=m_x mean=m_y;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 24 Oct 2020 15:18:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-average-of-x-and-y-for-each-group/m-p/694009#M211630</guid>
      <dc:creator>himself</dc:creator>
      <dc:date>2020-10-24T15:18:51Z</dc:date>
    </item>
    <item>
      <title>Re: Finding average of x and y for each group</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-average-of-x-and-y-for-each-group/m-p/694011#M211631</link>
      <description>&lt;P&gt;The starting value of a format range must be less than the final value of your format range. 97 is not less than 71&lt;/P&gt;</description>
      <pubDate>Sat, 24 Oct 2020 15:42:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-average-of-x-and-y-for-each-group/m-p/694011#M211631</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-10-24T15:42:12Z</dc:date>
    </item>
    <item>
      <title>Re: Finding average of x and y for each group</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-average-of-x-and-y-for-each-group/m-p/858862#M339344</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I need really help. I am unable to find where to find the program of the question below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Open the existing program, program48.sas from folder cert\errors. At any time, you may save your corrected program as program48 in cert\programs.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;This program is intended to:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;- Create 3 groups for Cvar: A-G is Group=1; H-N is Group=2; O-Z is Group=3 .&lt;BR /&gt;- All variations of the variable should be in the same group, i.e. “A” and “a” should be in Group=1.&lt;BR /&gt;-&amp;nbsp;Calculate the average of X and Y by Group.&lt;/P&gt;&lt;P&gt;There are multiple errors in the program. These may be syntax errors, logic errors, or problems with the program structure. Logic errors might not produce messages in the log, but will cause the program to produce results different than intended.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;What is the average (mean) of X for Group=2?&lt;/STRONG&gt;&lt;BR /&gt;Enter your answer to the nearest whole number.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This above question was listed in&amp;nbsp;&lt;A href="https://www.analyticsexam.com/" target="_blank"&gt;https://www.analyticsexam.com/&lt;/A&gt;&amp;nbsp;while I was doing practice in the goal to prepare my SAS base programming certification. I could not find the&amp;nbsp;&lt;STRONG&gt;program48.sas&amp;nbsp;&lt;/STRONG&gt;neither the&amp;nbsp;&lt;STRONG&gt;cert\errors&amp;nbsp;&lt;/STRONG&gt;folder. I am using SAS studio. I am really new in SAS. Your help will be really appreciated.&lt;/P&gt;&lt;P&gt;Thank you in advance!&lt;/P&gt;&lt;P&gt;Mouhamadou&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2023 04:09:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-average-of-x-and-y-for-each-group/m-p/858862#M339344</guid>
      <dc:creator>Mouhamadou</dc:creator>
      <dc:date>2023-02-15T04:09:36Z</dc:date>
    </item>
    <item>
      <title>Re: Finding average of x and y for each group</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-average-of-x-and-y-for-each-group/m-p/858873#M339350</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/392564"&gt;@Mouhamadou&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello everyone,&lt;/P&gt;
&lt;P&gt;I need really help. I am unable to find where to find the program of the question below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Open the existing program, program48.sas from folder cert\errors. At any time, you may save your corrected program as program48 in cert\programs.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;This program is intended to:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;- Create 3 groups for Cvar: A-G is Group=1; H-N is Group=2; O-Z is Group=3 .&lt;BR /&gt;- All variations of the variable should be in the same group, i.e. “A” and “a” should be in Group=1.&lt;BR /&gt;-&amp;nbsp;Calculate the average of X and Y by Group.&lt;/P&gt;
&lt;P&gt;There are multiple errors in the program. These may be syntax errors, logic errors, or problems with the program structure. Logic errors might not produce messages in the log, but will cause the program to produce results different than intended.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;What is the average (mean) of X for Group=2?&lt;/STRONG&gt;&lt;BR /&gt;Enter your answer to the nearest whole number.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This above question was listed in&amp;nbsp;&lt;A href="https://www.analyticsexam.com/" target="_blank" rel="noopener"&gt;https://www.analyticsexam.com/&lt;/A&gt;&amp;nbsp;while I was doing practice in the goal to prepare my SAS base programming certification. I could not find the&amp;nbsp;&lt;STRONG&gt;program48.sas&amp;nbsp;&lt;/STRONG&gt;neither the&amp;nbsp;&lt;STRONG&gt;cert\errors&amp;nbsp;&lt;/STRONG&gt;folder. I am using SAS studio. I am really new in SAS. Your help will be really appreciated.&lt;/P&gt;
&lt;P&gt;Thank you in advance!&lt;/P&gt;
&lt;P&gt;Mouhamadou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You should start your own thread. You have a very different issue than the topic of this thread. This thread is asking details of solution code, your question is &lt;STRONG&gt;access&lt;/STRONG&gt; to files from third-party (non-SAS vendor), which should be brought up to the support from that vendor.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2023 05:43:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-average-of-x-and-y-for-each-group/m-p/858873#M339350</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-02-15T05:43:53Z</dc:date>
    </item>
    <item>
      <title>Re: Finding average of x and y for each group</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-average-of-x-and-y-for-each-group/m-p/880275#M347804</link>
      <description>&lt;P&gt;The question is clearly said, "&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;Calculate the average of&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;X&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;and&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Y&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;by&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Group&lt;/STRONG&gt;&lt;SPAN&gt;." &lt;STRONG&gt;BY group&lt;/STRONG&gt;.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You should proc means the data&lt;STRONG&gt; by group&lt;/STRONG&gt; (&lt;STRONG&gt;where group=2).&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;proc means data=groups mean maxdec=2;&lt;BR /&gt;&lt;STRONG&gt;where group=2;&lt;/STRONG&gt;&lt;BR /&gt;class group;&lt;BR /&gt;var x yNew;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2023 19:21:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-average-of-x-and-y-for-each-group/m-p/880275#M347804</guid>
      <dc:creator>jjjjj2</dc:creator>
      <dc:date>2023-06-12T19:21:20Z</dc:date>
    </item>
  </channel>
</rss>

