tag:blogger.com,1999:blog-38091418.post116630486129711205..comments2024-03-28T02:22:30.024-04:00Comments on SAS Base Certification: Base SAS 107Vikas Gadduhttp://www.blogger.com/profile/11712556748971188468noreply@blogger.comBlogger31125tag:blogger.com,1999:blog-38091418.post-48354850079553289342023-08-10T21:19:33.288-04:002023-08-10T21:19:33.288-04:00Shouldn't the result come out like this?
Ranc...Shouldn't the result come out like this?<br /><br />Ranch, 1190,1,1,Rand Street,"$65,850"<br />CONDO, 1810,4,3,Garris Street,"$107,250" <br />RANCH, 1615,4,3,West Drive,"94,450"<br /><br />Get the first value from the first input style $@ and Since the second input came from input sqfeet bedrooms baths street $ price : dollar10.; shouldn't we get the second value sqfeet beds street $price?<br /><br />for example <br /><br />Ruth 39 11<br />Jose 32 22<br />Sue 30 33<br />John 40 44 <br />The following SAS program is submitted: <br />data test; <br />infile 'employee';<br />input employee_name $ 1-4; <br />if employee_name = 'Sue' then input age 7-8; <br />else input idnum 10-11;<br />run; <br />Which one of the following values does the variable AGE contain when the name of the employee is "Sue"?<br /><br />this answer is 40<br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-38091418.post-4166969671061785602023-04-29T13:21:04.125-04:002023-04-29T13:21:04.125-04:00if style = 'CONDO' or style = 'RANCH&#...if style = 'CONDO' or style = 'RANCH';<br />if there is no then in above statement , the if condition satisfies with style = 'CONDO' and style='RANCH' and produces 3 obs in output.<br /><br />if style = 'CONDO' or style = 'RANCH' then <br />in this case, the condition is asking only in these two cases provide the extra details. but it will produce all the 7 records with style and in this 7 four records will have missing values.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-38091418.post-54707077627231788312019-03-08T09:57:12.723-05:002019-03-08T09:57:12.723-05:00This comment has been removed by the author.Emhttps://www.blogger.com/profile/08905205165862006304noreply@blogger.comtag:blogger.com,1999:blog-38091418.post-58636583056211388872018-08-14T11:38:57.328-04:002018-08-14T11:38:57.328-04:00Thankyou! this helped a lot.Thankyou! this helped a lot.Parineetinoreply@blogger.comtag:blogger.com,1999:blog-38091418.post-6720515750724650722017-07-19T11:49:05.979-04:002017-07-19T11:49:05.979-04:00thanks.. but..I thought,,, Because of "input ...thanks.. but..I thought,,, Because of "input style $ @", the raw data of next to 1st 'SPLIT' would be 1190, so next style would be '1190'... is that wrong?Anonymoushttps://www.blogger.com/profile/09823512045777382810noreply@blogger.comtag:blogger.com,1999:blog-38091418.post-29973384018882819272017-07-06T06:41:50.918-04:002017-07-06T06:41:50.918-04:00the others there are with 'missing'the others there are with 'missing'Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-38091418.post-70091870717578659562017-03-20T10:46:46.846-04:002017-03-20T10:46:46.846-04:00if style = 'CONDO' or style = 'RANCH&#...if style = 'CONDO' or style = 'RANCH' then; : this statement gives 7 output<br /><br />and <br /><br />if style = 'CONDO' or style = 'RANCH';<br />gives 3 output. please explain the logic behindLEOS RULEShttps://www.blogger.com/profile/08685449431384887822noreply@blogger.comtag:blogger.com,1999:blog-38091418.post-53748936528032801742016-08-23T01:44:48.712-04:002016-08-23T01:44:48.712-04:00can u explain simple way to @ @@can u explain simple way to @ @@Anonymoushttps://www.blogger.com/profile/11577624242023825902noreply@blogger.comtag:blogger.com,1999:blog-38091418.post-29326434433567349302016-05-01T22:12:01.932-04:002016-05-01T22:12:01.932-04:00please anyone can give a better explanation to thi...please anyone can give a better explanation to this its confusing me a lotranihttps://www.blogger.com/profile/04094672436842100272noreply@blogger.comtag:blogger.com,1999:blog-38091418.post-55236334815768075782016-05-01T15:20:48.676-04:002016-05-01T15:20:48.676-04:00please anyone can give a better explanation to thi...please anyone can give a better explanation to this its confusing me a lot<br />ranihttps://www.blogger.com/profile/04094672436842100272noreply@blogger.comtag:blogger.com,1999:blog-38091418.post-84158021165218250082014-10-21T02:45:22.631-04:002014-10-21T02:45:22.631-04:00thanksthanksSuyashhttps://www.blogger.com/profile/02974464146999460721noreply@blogger.comtag:blogger.com,1999:blog-38091418.post-78998972387568154362014-08-01T21:37:29.439-04:002014-08-01T21:37:29.439-04:00Thanks...Now that is the way to explain. Hate the ...Thanks...Now that is the way to explain. Hate the other ppls who don't mention any fruitful comments, but throw something which confuses.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-38091418.post-34533395029578813962013-10-23T11:27:50.681-04:002013-10-23T11:27:50.681-04:00 Even though other styles except CONDO,RANCH has m... Even though other styles except CONDO,RANCH has missing value those were considered as an observation as the styles were present.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-38091418.post-55864709318485555372013-03-03T18:39:34.655-05:002013-03-03T18:39:34.655-05:00'then' makes all the difference. In this c...'then' makes all the difference. In this case, there are 2 input statements one before 'if' and one after 'if'. Second input statement reads only 3 obs. but first one reads all 7. Hence final output will contain 7 obs. in total with missing values for all the variables in the second input statement.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-38091418.post-29808092822411428162012-07-14T21:54:55.542-04:002012-07-14T21:54:55.542-04:00D because only the input is affected by the IF sta...D because only the input is affected by the IF statement; not the output.oscarhttps://www.blogger.com/profile/16485674808703962409noreply@blogger.comtag:blogger.com,1999:blog-38091418.post-20569350364250735392011-07-28T11:17:34.028-04:002011-07-28T11:17:34.028-04:00Someone is right about the trailing @ which will h...Someone is right about the trailing @ which will hold the " Style" <br />But only tree of them has all the information it has in the statements.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-38091418.post-32332460184592474552011-07-28T11:07:12.667-04:002011-07-28T11:07:12.667-04:00We need to read the question carefully.
20 birds...We need to read the question carefully.<br /><br /> 20 birds came to a tree if a hunter kills 3 birds in one shot how many bird are in the tree?<br /><br />If we do plus and minus the answer will be 17, but rest fly away no birds are awaiting for the second shots.<br />Here it is not asking the observations of the output but the observations in the data set before execution.<br />I read that way and got answer 'D'.<br /><br />Thanks for reading may nasty comment.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-38091418.post-16036849501577649132011-06-21T12:26:54.342-04:002011-06-21T12:26:54.342-04:00Why we are getting the outcome with 7 observations...Why we are getting the outcome with 7 observations? <br />As someone explained on earlier that @ sign will not let it move further and ends there, and it will not execute this statement,<br /><br />if style = 'CONDO' or style = 'RANCH' then<br /> <br />and we are getting all style in the output.<br />So the culprit is @ sign and which works as the stop sing and halts right there and we get the result with 7 obs.<br />It is my understanding.<br />sakar ShamAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-38091418.post-29377359227585303162011-06-01T16:38:12.145-04:002011-06-01T16:38:12.145-04:00the then in #107 gives all observations because no...the then in #107 gives all observations because no condition has been placed to subset the data. the absence of then in #106 is allowing the if statement act as a subsetting function in this case restricting the output to only 3.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-38091418.post-19808721026043717222010-12-22T13:04:22.072-05:002010-12-22T13:04:22.072-05:00if we remove 'then' from the statement
if ...if we remove 'then' from the statement<br />if style = 'CONDO' or style = 'RANCH' then<br /><br />only then the number of observations is 3, otherwise its 7Anonymoushttps://www.blogger.com/profile/17711575365775410169noreply@blogger.comtag:blogger.com,1999:blog-38091418.post-55984467431789324552010-01-22T12:58:37.931-05:002010-01-22T12:58:37.931-05:00question though: #106 had also "input style $...question though: #106 had also "input style $ @;" - the only difference I may note b/w these 2 is the THEN in the comparison line...Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-38091418.post-52307692134023621572009-02-13T18:47:00.000-05:002009-02-13T18:47:00.000-05:00D for sureD for sureAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-38091418.post-55843376061296840722009-01-15T14:55:00.000-05:002009-01-15T14:55:00.000-05:00Answer is D.Reason being statement "input style $ ...Answer is D.<BR/>Reason being statement "input style $ @;" will hold input stream until next input statement. Program will read next input statement only if style is condo or ranch. But even when style is not condo or ranch when run statement is executed output will be written with just style variable having value and all others will be missing. Check it out using the program given below.<BR/><BR/>data work.condo_ranch;<BR/>infile datalines dsd;<BR/>input style $ @;<BR/>if style = 'CONDO' or style = 'RANCH' then<BR/>input sqfeet bedrooms baths street $ price : dollar10.;<BR/>datalines;<BR/>RANCH,1250,2,1,Sheppard Avenue,"$64,000"<BR/>SPLIT,1190,1,1,Rand Street,"$65,850"<BR/>CONDO,1400,2,1.5,Market Street,"80,050"<BR/>TWOSTORY,1810,4,3,Garris Street,"$107,250"<BR/>RANCH,1500,3,3,Kemble Avenue,"$86,650"<BR/>SPLIT,1615,4,3,West Drive,"94,450"<BR/>SPLIT,1305,3,1.5,Graham Avenue,"$73,650"<BR/>run;<BR/><BR/>proc print;<BR/>run;Vikas Gadduhttps://www.blogger.com/profile/11712556748971188468noreply@blogger.comtag:blogger.com,1999:blog-38091418.post-52031120573950890782009-01-15T13:30:00.000-05:002009-01-15T13:30:00.000-05:00The above explanation in wrong. Will have only 3 o...The above explanation in wrong. Will have only 3 observations <BR/><BR/>RANCH 1250 2 1 Sheppard Avenue 64000<BR/>CONDO 1400 2 1.5 Market Street 80050<BR/>RANCH 1500 3 3 Kemble Avenue 86650<BR/><BR/>I ran the code to confirm.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-38091418.post-55343521363788759392009-01-15T13:21:00.000-05:002009-01-15T13:21:00.000-05:00RANCH 1250 2 1 Sheppard Avenue $64,000SPLITCONDO 1...RANCH 1250 2 1 Sheppard Avenue $64,000<BR/>SPLIT<BR/>CONDO 1400 2 1.5 Market Street $80,050<BR/>TWOSTORY<BR/>RANCH 1500 3 3 Kemble Avenue $86,650<BR/>SPLIT<BR/>SPLIT<BR/><BR/>Output looks similar to this fashion. Since we have input style $ @; then comes if then.Anonymousnoreply@blogger.com