<?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: ANSWER THESE WITH PROPER EXPLANATION Please in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ANSWER-THESE-WITH-PROPER-EXPLANATION-Please/m-p/576812#M163328</link>
    <description>&lt;P&gt;So what have you answered?&lt;/P&gt;</description>
    <pubDate>Fri, 26 Jul 2019 06:34:44 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2019-07-26T06:34:44Z</dc:date>
    <item>
      <title>ANSWER THESE WITH PROPER EXPLANATION Please</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ANSWER-THESE-WITH-PROPER-EXPLANATION-Please/m-p/576810#M163327</link>
      <description>&lt;DIV class="question"&gt;&lt;P&gt;1. Will the following SAS code results in an output dataset or a results viewer?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Proc means data=cashvolatility noprint;
var cash;
by year;
output out=means mean=avgcash std=stdcash;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;No to output dataset, yes to results viewer&lt;/P&gt;&lt;P&gt;No to both&lt;/P&gt;&lt;P&gt;Yes to output dataset , no to results viewer&lt;/P&gt;&lt;P&gt;Yes to both&lt;/P&gt;&lt;P&gt;2. If this sample includes company information for years 2001 to 2010, how many observations would be included in an output dataset (if one exists)? Use the following SAS code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Proc means data=cashvolatility noprint;
var cash;
by year;
output out=means mean=avgcash std=stdcash;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;100&lt;/P&gt;&lt;P&gt;10&lt;/P&gt;&lt;P&gt;Unknown because we do not know how many companies are in the initial dataset&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;3. What does&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;mean=avgcash&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;do in the following SAS code?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Proc means data=cashvolatility noprint;
var cash;
by year;
output out=means mean=avgcash std=stdcash;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Requires only the output to include the mean of cash&lt;/P&gt;&lt;P&gt;Takes the average of cash holdings&lt;/P&gt;&lt;P&gt;Renames the variable representing mean of cash to avgcash&lt;/P&gt;&lt;P&gt;Ensures that the mean of cash is measured as the average of cash&lt;/P&gt;&lt;P&gt;Reference the following SAS code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data Cash; Set Leverage;
Run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;4. Was a new dataset created by this line? If so what is the dataset name?&lt;/P&gt;&lt;P&gt;No&lt;/P&gt;&lt;P&gt;Yes, Leverage&lt;/P&gt;&lt;P&gt;Yes, Cash&lt;/P&gt;&lt;P&gt;Yes, Data&lt;/P&gt;&lt;/DIV&gt;&lt;DIV class="skipAnswerBtn"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Fri, 26 Jul 2019 06:23:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ANSWER-THESE-WITH-PROPER-EXPLANATION-Please/m-p/576810#M163327</guid>
      <dc:creator>MANIK1</dc:creator>
      <dc:date>2019-07-26T06:23:45Z</dc:date>
    </item>
    <item>
      <title>NEED THE ANSWERS WITH EXPLANATION</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ANSWER-THESE-WITH-PROPER-EXPLANATION-Please/m-p/576809#M163330</link>
      <description>&lt;DIV class="question"&gt;&lt;P&gt;1. Will the following SAS code results in an output dataset or a results viewer?&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Proc means data=cashvolatility noprint;&lt;BR /&gt;var cash;&lt;BR /&gt;by year;&lt;BR /&gt;output out=means mean=avgcash std=stdcash;&lt;BR /&gt;run;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;No to output dataset, yes to results viewer&lt;/P&gt;&lt;P&gt;No to both&lt;/P&gt;&lt;P&gt;Yes to output dataset , no to results viewer&lt;/P&gt;&lt;P&gt;Yes to both&lt;/P&gt;&lt;P&gt;2. If this sample includes company information for years 2001 to 2010, how many observations would be included in an output dataset (if one exists)? Use the following SAS code:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Proc means data=cashvolatility noprint;&lt;BR /&gt;var cash;&lt;BR /&gt;by year;&lt;BR /&gt;output out=means mean=avgcash std=stdcash;&lt;BR /&gt;run;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;100&lt;/P&gt;&lt;P&gt;10&lt;/P&gt;&lt;P&gt;Unknown because we do not know how many companies are in the initial dataset&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;3. What does&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;mean=avgcash&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;do in the following SAS code?&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Proc means data=cashvolatility noprint;&lt;BR /&gt;var cash;&lt;BR /&gt;by year;&lt;BR /&gt;output out=means mean=avgcash std=stdcash;&lt;BR /&gt;run;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Requires only the output to include the mean of cash&lt;/P&gt;&lt;P&gt;Takes the average of cash holdings&lt;/P&gt;&lt;P&gt;Renames the variable representing mean of cash to avgcash&lt;/P&gt;&lt;P&gt;Ensures that the mean of cash is measured as the average of cash&lt;/P&gt;&lt;P&gt;Reference the following SAS code:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Data Cash; Set Leverage;&lt;BR /&gt;Run;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;4. Was a new dataset created by this line? If so what is the dataset name?&lt;/P&gt;&lt;P&gt;No&lt;/P&gt;&lt;P&gt;Yes, Leverage&lt;/P&gt;&lt;P&gt;Yes, Cash&lt;/P&gt;&lt;P&gt;Yes, Data&lt;/P&gt;&lt;/DIV&gt;&lt;DIV class="skipAnswerBtn"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Fri, 26 Jul 2019 06:20:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ANSWER-THESE-WITH-PROPER-EXPLANATION-Please/m-p/576809#M163330</guid>
      <dc:creator>MANIK1</dc:creator>
      <dc:date>2019-07-26T06:20:06Z</dc:date>
    </item>
    <item>
      <title>Re: ANSWER THESE WITH PROPER EXPLANATION Please</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ANSWER-THESE-WITH-PROPER-EXPLANATION-Please/m-p/576812#M163328</link>
      <description>&lt;P&gt;So what have you answered?&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2019 06:34:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ANSWER-THESE-WITH-PROPER-EXPLANATION-Please/m-p/576812#M163328</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-07-26T06:34:44Z</dc:date>
    </item>
    <item>
      <title>Re: ANSWER THESE WITH PROPER EXPLANATION Please</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ANSWER-THESE-WITH-PROPER-EXPLANATION-Please/m-p/576816#M163332</link>
      <description>&lt;P&gt;Please stop shouting and add some explanation why you have difficulties answering the questions. All questions could be answered by reading the documentation.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2019 06:39:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ANSWER-THESE-WITH-PROPER-EXPLANATION-Please/m-p/576816#M163332</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2019-07-26T06:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: ANSWER THESE WITH PROPER EXPLANATION Please</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ANSWER-THESE-WITH-PROPER-EXPLANATION-Please/m-p/576821#M163333</link>
      <description>&lt;P&gt;What are you speaking??&lt;/P&gt;&lt;P&gt;I posted for answers.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2019 07:23:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ANSWER-THESE-WITH-PROPER-EXPLANATION-Please/m-p/576821#M163333</guid>
      <dc:creator>MANIK1</dc:creator>
      <dc:date>2019-07-26T07:23:05Z</dc:date>
    </item>
    <item>
      <title>Re: ANSWER THESE WITH PROPER EXPLANATION Please</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ANSWER-THESE-WITH-PROPER-EXPLANATION-Please/m-p/576825#M163336</link>
      <description>&lt;P&gt;Read the relevant documentation, and the answers will be VERY easy. If in doubt, simply test the code.&lt;/P&gt;
&lt;P&gt;If you're not willing to invest a little effort yourself, you'll never become any good with SAS.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2019 07:49:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ANSWER-THESE-WITH-PROPER-EXPLANATION-Please/m-p/576825#M163336</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-07-26T07:49:52Z</dc:date>
    </item>
    <item>
      <title>Re: ANSWER THESE WITH PROPER EXPLANATION Please</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ANSWER-THESE-WITH-PROPER-EXPLANATION-Please/m-p/576826#M163337</link>
      <description>I dont have the software right now so asking your help.Please help me in solving 1 and 2 questions atleast.</description>
      <pubDate>Fri, 26 Jul 2019 07:52:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ANSWER-THESE-WITH-PROPER-EXPLANATION-Please/m-p/576826#M163337</guid>
      <dc:creator>MANIK1</dc:creator>
      <dc:date>2019-07-26T07:52:27Z</dc:date>
    </item>
    <item>
      <title>Re: ANSWER THESE WITH PROPER EXPLANATION Please</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ANSWER-THESE-WITH-PROPER-EXPLANATION-Please/m-p/576830#M163339</link>
      <description>Atlease say whether my answers are correct or wrong&lt;BR /&gt;Yes,to both&lt;BR /&gt;Unknown because we do not know how many companies are in the initial dataset.&lt;BR /&gt;Ensures&amp;nbsp;that the mean of cash is measured as the average of cash&lt;BR /&gt;Yes the dataset will be created with name Cash.</description>
      <pubDate>Fri, 26 Jul 2019 08:08:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ANSWER-THESE-WITH-PROPER-EXPLANATION-Please/m-p/576830#M163339</guid>
      <dc:creator>MANIK1</dc:creator>
      <dc:date>2019-07-26T08:08:06Z</dc:date>
    </item>
    <item>
      <title>Re: ANSWER THESE WITH PROPER EXPLANATION Please</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ANSWER-THESE-WITH-PROPER-EXPLANATION-Please/m-p/576844#M163346</link>
      <description>You don't need the software in order to read the documentation.  Here are some topics to explore.&lt;BR /&gt;&lt;BR /&gt;In PROC MEANS, what does the NOPRINT option do?&lt;BR /&gt;&lt;BR /&gt;In PROC MEANS, what does the OUTPUT statement do?&lt;BR /&gt;&lt;BR /&gt;In the OUTPUT statement, what does MEAN= do?&lt;BR /&gt;&lt;BR /&gt;What does a DATA statement do?&lt;BR /&gt;&lt;BR /&gt;What does a SET statement do?&lt;BR /&gt;&lt;BR /&gt;These are all basic things you will use every day that you program.  You have to learn them.  Nobody can learn them for you.</description>
      <pubDate>Fri, 26 Jul 2019 09:19:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ANSWER-THESE-WITH-PROPER-EXPLANATION-Please/m-p/576844#M163346</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2019-07-26T09:19:06Z</dc:date>
    </item>
    <item>
      <title>Re: ANSWER THESE WITH PROPER EXPLANATION Please</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ANSWER-THESE-WITH-PROPER-EXPLANATION-Please/m-p/576851#M163351</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/282938"&gt;@MANIK1&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Atlease say whether my answers are correct or wrong&lt;BR /&gt;Yes,to both&lt;BR /&gt;Unknown because we do not know how many companies are in the initial dataset.&lt;BR /&gt;Ensures&amp;nbsp;that the mean of cash is measured as the average of cash&lt;BR /&gt;Yes the dataset will be created with name Cash.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Third and fourth answer are OK.&lt;/P&gt;
&lt;P&gt;For the first and second, review the&amp;nbsp;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.3&amp;amp;docsetId=proc&amp;amp;docsetTarget=n0k7qr5c2ah3stn10g1lr5oytz57.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;proc means documentation&lt;/A&gt;. &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4954"&gt;@Astounding&lt;/a&gt;&amp;nbsp;has given you hints to crucial parts.&lt;/P&gt;
&lt;P&gt;I recommend to study what the&amp;nbsp;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.3&amp;amp;docsetId=proc&amp;amp;docsetTarget=p1o0q4jmbtp52hn13yrk7umoqo2t.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;by&lt;/A&gt; statement does in proc means, and how the variable used in it determines the size of the output.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2019 10:03:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ANSWER-THESE-WITH-PROPER-EXPLANATION-Please/m-p/576851#M163351</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-07-26T10:03:40Z</dc:date>
    </item>
    <item>
      <title>Re: ANSWER THESE WITH PROPER EXPLANATION Please</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ANSWER-THESE-WITH-PROPER-EXPLANATION-Please/m-p/576900#M163371</link>
      <description>Hi:&lt;BR /&gt;  You can  use either SAS University Edition or SAS OnDemand for Academics to get access to SAS for free non-commercial learning purposes. This would allow you to test code and find out the answers on your own.&lt;BR /&gt;&lt;BR /&gt;Cynthia</description>
      <pubDate>Fri, 26 Jul 2019 13:35:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ANSWER-THESE-WITH-PROPER-EXPLANATION-Please/m-p/576900#M163371</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2019-07-26T13:35:28Z</dc:date>
    </item>
    <item>
      <title>Re: ANSWER THESE WITH PROPER EXPLANATION Please</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ANSWER-THESE-WITH-PROPER-EXPLANATION-Please/m-p/577105#M163491</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/282938"&gt;@MANIK1&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Atlease say whether my answers are correct or wrong&lt;BR /&gt;Yes,to both&lt;BR /&gt;Unknown because we do not know how many companies are in the initial dataset.&lt;BR /&gt;Ensures&amp;nbsp;that the mean of cash is measured as the average of cash&lt;BR /&gt;Yes the dataset will be created with name Cash.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Your original post did not provide your answers. Just the questions.&lt;/P&gt;
&lt;P&gt;Are the last four lines of this particular post intended as your answers?&amp;nbsp; If so then you should have labeled them with at least the question numbers to make it easier to check and also to make it clearer what this post was trying to say.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;1. Will the following SAS code results in an output dataset or a results viewer?&lt;/STRONG&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Proc means data=cashvolatility noprint;
  var cash;
  by year;
  output out=means mean=avgcash std=stdcash;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;No to output dataset, yes to results viewer&lt;/P&gt;
&lt;P&gt;No to both&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;--&amp;gt; Yes to output dataset , no to results viewer&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Yes to both&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That seems to be the best answer since the NOPRINT option was included on the PROC statement which suppress the output that PROC MEANS normally produces.&amp;nbsp; But perhaps by "&lt;STRONG&gt;results viewer&lt;/STRONG&gt;" they mean the automatic opening of generated datasets that Enterprise Guide and SAS/Studio will do when configured that way.&amp;nbsp; In which case the last answer might be better as the dataset will both be generated and it will be opened in a viewer.&amp;nbsp; They didn't give an option of neither, which is what will happen if the input dataset does not exist or it is not sorted by YEAR.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you can provide your answers in a similar way then we can provide feedback on your level of understanding.&amp;nbsp; Be sure to include any specific questions about things that seem confusing to you to help direct the comments.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2019 21:28:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ANSWER-THESE-WITH-PROPER-EXPLANATION-Please/m-p/577105#M163491</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-07-26T21:28:14Z</dc:date>
    </item>
    <item>
      <title>Re: ANSWER THESE WITH PROPER EXPLANATION Please</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ANSWER-THESE-WITH-PROPER-EXPLANATION-Please/m-p/577108#M163494</link>
      <description>Yes Sir.&lt;BR /&gt;I mean to say in that way.&lt;BR /&gt;Sorry i couldn't post in that way&lt;BR /&gt;My original post consists of only questions.&lt;BR /&gt;The thread which you replied were my answers for those questions .&lt;BR /&gt;Thank you for answering .Thank you so much.&lt;BR /&gt;I never used this interface and i was not aware and i don't have so much time at that moment to explore this site so couldn't upload it properly .&lt;BR /&gt;Will make sure that i will be uploading in a similar fashion of yours in future.&lt;BR /&gt;Thank you so much .</description>
      <pubDate>Fri, 26 Jul 2019 21:35:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ANSWER-THESE-WITH-PROPER-EXPLANATION-Please/m-p/577108#M163494</guid>
      <dc:creator>MANIK1</dc:creator>
      <dc:date>2019-07-26T21:35:48Z</dc:date>
    </item>
    <item>
      <title>Re: ANSWER THESE WITH PROPER EXPLANATION Please</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ANSWER-THESE-WITH-PROPER-EXPLANATION-Please/m-p/577109#M163495</link>
      <description>And May i know the answer for Second question ?</description>
      <pubDate>Fri, 26 Jul 2019 21:38:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ANSWER-THESE-WITH-PROPER-EXPLANATION-Please/m-p/577109#M163495</guid>
      <dc:creator>MANIK1</dc:creator>
      <dc:date>2019-07-26T21:38:21Z</dc:date>
    </item>
    <item>
      <title>Re: ANSWER THESE WITH PROPER EXPLANATION Please</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ANSWER-THESE-WITH-PROPER-EXPLANATION-Please/m-p/577110#M163496</link>
      <description>Thanks &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;</description>
      <pubDate>Fri, 26 Jul 2019 21:43:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ANSWER-THESE-WITH-PROPER-EXPLANATION-Please/m-p/577110#M163496</guid>
      <dc:creator>MANIK1</dc:creator>
      <dc:date>2019-07-26T21:43:09Z</dc:date>
    </item>
    <item>
      <title>Re: ANSWER THESE WITH PROPER EXPLANATION Please</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ANSWER-THESE-WITH-PROPER-EXPLANATION-Please/m-p/577111#M163497</link>
      <description>&lt;P&gt;Ok. Let's look at the last three.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="question"&gt;
&lt;P&gt;&lt;STRONG&gt;2. If this sample includes company information for years 2001 to 2010, how many observations would be included in an output dataset (if one exists)? Use the following SAS code:&lt;/STRONG&gt;&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token procnames"&gt;Proc&lt;/SPAN&gt; &lt;SPAN class="token procnames"&gt;means&lt;/SPAN&gt; &lt;SPAN class="token procnames"&gt;data&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;cashvolatility noprint&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token keyword"&gt;var&lt;/SPAN&gt; cash&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token statement"&gt;by&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;year&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
output out&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token procnames"&gt;means&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;mean&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;avgcash &lt;SPAN class="token function"&gt;std&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;stdcash&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token procnames"&gt;run&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;100&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;--&amp;gt; 10 &amp;lt;--&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Unknown because we do not know how many companies are in the initial dataset&lt;/P&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;10 is the best answer, but that requires making a lot of assumptions.&amp;nbsp; First that the variable YEAR is coded with values like 2001, 2002, to 2010 and not in some other way. For example if it was coded as a DATE variable with YEAR format attached to it the values would look like there were only 10 values, but perhaps different records used different days from within that year.&amp;nbsp; The BY statement will ignore the format attached and just use the distinct actual values.&amp;nbsp; Also that all 10 years actual have records in the dataset.&amp;nbsp; And that the dataset is actually sorted by the YEAR variable (in ascending order).&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;3. What does&amp;nbsp;&lt;EM&gt;mean=avgcash&lt;/EM&gt;&amp;nbsp;do in the following SAS code?&lt;/STRONG&gt;&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token procnames"&gt;Proc&lt;/SPAN&gt; &lt;SPAN class="token procnames"&gt;means&lt;/SPAN&gt; &lt;SPAN class="token procnames"&gt;data&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;cashvolatility noprint&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token keyword"&gt;var&lt;/SPAN&gt; cash&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token statement"&gt;by&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;year&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
output out&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token procnames"&gt;means&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;mean&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;avgcash &lt;SPAN class="token function"&gt;std&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;stdcash&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token procnames"&gt;run&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Requires only the output to include the mean of cash&lt;/P&gt;
&lt;P&gt;Takes the average of cash holdings&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;--&amp;gt; Renames the variable representing mean of cash to avgcash &amp;lt;--&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Ensures that the mean of cash is measured as the average of cash&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The MEAN= option on the OUTPUT statement of PROC MEANS (and SUMMARY) gives in instructions to both INCLUDE the MEAN statistic in the output dataset and how to NAME the variable.&amp;nbsp; &amp;nbsp;It is not really &lt;STRONG&gt;RE-&lt;/STRONG&gt;naming the variable since a variable with the MEAN of CASH didn't exist until PROC MEANS calculated it.&amp;nbsp;&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;4. Reference the following SAS code:&lt;/STRONG&gt;&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token procnames"&gt;Data&lt;/SPAN&gt; Cash&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;Set&lt;/SPAN&gt; Leverage&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token procnames"&gt;Run&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;STRONG&gt;Was a new dataset created by this line? If so what is the dataset name?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;No&lt;/P&gt;
&lt;P&gt;Yes, Leverage&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;--&amp;gt; Yes, Cash &amp;lt;--&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Yes, Data&lt;/P&gt;
&lt;/DIV&gt;
&lt;DIV class="skipAnswerBtn"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="skipAnswerBtn"&gt;The name(s) listed on the DATA statement are the names of the dataset being created.&amp;nbsp; Even if CASH existed before it will be replaced by the result of this data step, so it will definitely be a NEW dataset.&lt;/DIV&gt;
&lt;DIV class="skipAnswerBtn"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="skipAnswerBtn"&gt;Note that the use the word &lt;STRONG&gt;LINE&lt;/STRONG&gt; in the question is inappropriate.&amp;nbsp; SAS does not care about line breaks when interpreting code. And anyway the code posted is two lines in the question.&amp;nbsp; This data step has three STATEMENTS.&lt;/DIV&gt;</description>
      <pubDate>Fri, 26 Jul 2019 21:56:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ANSWER-THESE-WITH-PROPER-EXPLANATION-Please/m-p/577111#M163497</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-07-26T21:56:38Z</dc:date>
    </item>
  </channel>
</rss>

