<?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: Correct answer doesn't show in results/output data. in SAS Certification</title>
    <link>https://communities.sas.com/t5/SAS-Certification/Correct-answer-doesn-t-show-in-results-output-data/m-p/765164#M1187</link>
    <description>I was not able to get the log, however both were ran without issues and none of them affected the median value that I was provided. So I am still puzzled as to how the answers given are different.</description>
    <pubDate>Tue, 31 Aug 2021 20:06:41 GMT</pubDate>
    <dc:creator>ChaoticSweets</dc:creator>
    <dc:date>2021-08-31T20:06:41Z</dc:date>
    <item>
      <title>Correct answer doesn't show in results/output data.</title>
      <link>https://communities.sas.com/t5/SAS-Certification/Correct-answer-doesn-t-show-in-results-output-data/m-p/764656#M1179</link>
      <description>&lt;P&gt;Hello, i am currently trying to score an 80 on the prac exam but SAS has been a bit difficult for me to catch on.&lt;/P&gt;&lt;P&gt;Currently, i am reviewing my practice exam answers.&amp;nbsp;&lt;BR /&gt;I will display my code and the assumed correct code. However, the answers are vague and don't show how I can get the answer. This code also heavily puzzled me initally at first.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here is the prompt to create the code initally in the prac exam;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;Step 1:&lt;/SPAN&gt;&lt;/LI&gt;&lt;UL&gt;&lt;LI&gt;create a temporary data set,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;cleandata36&lt;/STRONG&gt;.&lt;/LI&gt;&lt;LI&gt;In this data set, convert all&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;group&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;values to upper case.&lt;/LI&gt;&lt;LI&gt;Then keep only observations with&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;group&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;equal to 'A' or 'B'.&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI&gt;Step 2:&lt;/LI&gt;&lt;UL&gt;&lt;LI&gt;Determine the MEDIAN value for the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Kilograms&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;variable for each&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;group&lt;/STRONG&gt;&amp;nbsp;(A,B) in the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;cleandata36&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;data set. Round MEDIAN to the nearest whole number.&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI&gt;Step 3:&lt;/LI&gt;&lt;UL&gt;&lt;LI&gt;create&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;results.output36&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;from&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;cleandata36&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;Ensure that all values for variable&amp;nbsp;&lt;STRONG&gt;Kilograms&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;are between 40 and 200, inclusively.&lt;/LI&gt;&lt;LI&gt;If the value is missing or out of range, replace the value with the MEDIAN&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Kilograms&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;value for the respective&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;group&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;(A,B) calculated in step 2.&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The question i'm struggling with is&lt;/P&gt;&lt;P&gt;"&lt;SPAN&gt;What is the MEAN&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Kilograms&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;value for&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;group&lt;/STRONG&gt;&lt;SPAN&gt;=‘A’ in the&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;results.output36&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;data set?"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and of course the same, but for group B.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;My code:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;data cleandata36;
     set cert.input36;
     Group=Upcase(group);
     if Group in ('A', 'B') then output;
run;

proc means data=cleandata36 median maxdec=0;
     class Group;
     var Kilograms;
run;

data results.output36;
     set cleam data36;
     if 40 &amp;lt; kilograms &amp;lt; 200 &amp;lt; then do;
     if Group = 'A' then kilograms=79;
     else Kilograms=89;
   end;
run;&lt;/PRE&gt;&lt;P&gt;Suggested correct code:&lt;/P&gt;&lt;PRE&gt;data work.cleandata36;
     set cert.input36;
     group=upcase(group);
     if group in ('A', 'B'); 
run;

proc means data=work.cleandata36 median;
     class group;
     var kilograms;
run;

data results.output36;
     set cleandata36;
     if Kilograms&amp;lt;30 or  Kilograms&amp;gt;200 then do;
     if group='A' then kilograms=79;
     else kilograms=89;
end;
run;

proc contents data=results.output36;
run;&lt;/PRE&gt;&lt;P&gt;The mean that I found that was also indicated in the correct answer was 79 for group A, and 89 for group B.&lt;/P&gt;&lt;P&gt;however, the answers given was 76.3 for group A, and 86.5 for group b. I can't find the median in the results nor output data. I'm not sure where to look.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm assuming it's because of maxdec?...hopefully? if not, why?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please go easy on me with terminology/wording.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Iam also actively looking for a tutor if anyone knows one or would like to help because again i am STRUGGLING with learning a lot of these. videos are more difficult than it is with someone that can answer my questions asap because there is so many. thank you haha.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;lastly if you are also studying for your exam, we got this! please send me a message and hopefully we can help each other. thank you for your time!&lt;/P&gt;</description>
      <pubDate>Sun, 29 Aug 2021 02:02:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Certification/Correct-answer-doesn-t-show-in-results-output-data/m-p/764656#M1179</guid>
      <dc:creator>ChaoticSweets</dc:creator>
      <dc:date>2021-08-29T02:02:44Z</dc:date>
    </item>
    <item>
      <title>Re: Correct answer doesn't show in results/output data.</title>
      <link>https://communities.sas.com/t5/SAS-Certification/Correct-answer-doesn-t-show-in-results-output-data/m-p/764661#M1180</link>
      <description>&lt;P&gt;One thing to look at: the requirement Ensure that all values for variable&amp;nbsp;&lt;STRONG&gt;Kilograms&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;are between 40 and 200, inclusively.&lt;/P&gt;
&lt;P&gt;Inclusively means that 40 and 200 are in the output.&lt;/P&gt;
&lt;P&gt;Your code&lt;/P&gt;
&lt;PRE&gt;     if 40 &amp;lt; kilograms &amp;lt; 200 &amp;lt; then do;&lt;/PRE&gt;
&lt;P&gt;Has a serious issue with the third &amp;lt;, which I suspect you did not run successfully , and the rest excludes 40 and 200.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your "then do" would change the values of kilograms in the specified range not the missing or out of range values to ALL of the supposedly kept values to the median&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There may be a problem with the instructions and the suggested code. Your copy of the requirement says 40 to 200&lt;/P&gt;
&lt;P&gt;but the suggested code is using 30 and 200 as boundaries. So either your instructions are not copied correctly or the suggested code is using a different set of boundaries. So double check that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You haven't provided an example of the cert.input36 so there isn't a way to check exactly.&lt;/P&gt;
&lt;P&gt;If you can write a data step with the actual values we can provide some more details. A data step with the values would look something like:&lt;/P&gt;
&lt;PRE&gt;data have;
   input group $ kilograms;
datalines;
a  123
B  88
c  345
;&lt;/PRE&gt;
&lt;P&gt;but with more lines to read.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note: It is often a very good idea to provide the LOG of the code you used because it will show 1) what you actually submitted and 2) it often provides some of the answers, or details of the answers to questions about "why does my code not do the expected &amp;lt;something about the output goes here&amp;gt;&amp;nbsp; ?"&lt;/P&gt;</description>
      <pubDate>Sun, 29 Aug 2021 07:07:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Certification/Correct-answer-doesn-t-show-in-results-output-data/m-p/764661#M1180</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-08-29T07:07:29Z</dc:date>
    </item>
    <item>
      <title>Re: Correct answer doesn't show in results/output data.</title>
      <link>https://communities.sas.com/t5/SAS-Certification/Correct-answer-doesn-t-show-in-results-output-data/m-p/764930#M1181</link>
      <description>Thank you for responding!! I appreciate it a lot as well as how you broke it down.&lt;BR /&gt;&lt;BR /&gt;I am trying to pull up the log results for both my answer and the correct answer, however sas virtual labs is not allowing my libref to work correctly all of a sudden so I'm going to have to respond to this again a little later today to figure it out.</description>
      <pubDate>Mon, 30 Aug 2021 19:31:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Certification/Correct-answer-doesn-t-show-in-results-output-data/m-p/764930#M1181</guid>
      <dc:creator>ChaoticSweets</dc:creator>
      <dc:date>2021-08-30T19:31:11Z</dc:date>
    </item>
    <item>
      <title>Re: Correct answer doesn't show in results/output data.</title>
      <link>https://communities.sas.com/t5/SAS-Certification/Correct-answer-doesn-t-show-in-results-output-data/m-p/765029#M1183</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/381115"&gt;@ChaoticSweets&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just a note on preparation process and some insights that we have learned over time. It appears to me from this thread that you are using the practice exam early in your preparation process as a method to 'learn SAS.' I would caution against this. Rather, I would recommend using the Exam Content Guide, the recommended training courses, the exam prep guide, and time coding in SAS to 'learn SAS.'&amp;nbsp; Then, once you have gained a solid understanding of SAS programming, then use the practice exam to check that you are ready for the actual exam. Using the practice exam to guide your learning will cause you to (&lt;EM&gt;to use a statistical modeling term&lt;/EM&gt;) 'overfit' your knowledge to the practice exam.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Aug 2021 12:14:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Certification/Correct-answer-doesn-t-show-in-results-output-data/m-p/765029#M1183</guid>
      <dc:creator>Mark2010</dc:creator>
      <dc:date>2021-08-31T12:14:05Z</dc:date>
    </item>
    <item>
      <title>Re: Correct answer doesn't show in results/output data.</title>
      <link>https://communities.sas.com/t5/SAS-Certification/Correct-answer-doesn-t-show-in-results-output-data/m-p/765163#M1186</link>
      <description>I was found out. haha. I appreciate the guidance! For me, I am just trying to find the best method of trying to learn since I don't really have an instructor and everything I am learning is self-paced. So I am using it in terms of attempting to utilize my notes some more and do thorough studying on terms that maybe I've missed out on, or if I need to go back and relearn that specific subject I shall. Although, I could be doing it all wrong. It's been a while since I've had to study for anything in all honestly so I've lost touch.&lt;BR /&gt;&lt;BR /&gt;Thank you!</description>
      <pubDate>Tue, 31 Aug 2021 20:05:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Certification/Correct-answer-doesn-t-show-in-results-output-data/m-p/765163#M1186</guid>
      <dc:creator>ChaoticSweets</dc:creator>
      <dc:date>2021-08-31T20:05:36Z</dc:date>
    </item>
    <item>
      <title>Re: Correct answer doesn't show in results/output data.</title>
      <link>https://communities.sas.com/t5/SAS-Certification/Correct-answer-doesn-t-show-in-results-output-data/m-p/765164#M1187</link>
      <description>I was not able to get the log, however both were ran without issues and none of them affected the median value that I was provided. So I am still puzzled as to how the answers given are different.</description>
      <pubDate>Tue, 31 Aug 2021 20:06:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Certification/Correct-answer-doesn-t-show-in-results-output-data/m-p/765164#M1187</guid>
      <dc:creator>ChaoticSweets</dc:creator>
      <dc:date>2021-08-31T20:06:41Z</dc:date>
    </item>
  </channel>
</rss>

