The SAS data set named COMPANY.PRICES is listed below:
COMPANY.PRICES
prodid price producttype sales returns
K12S 5.10 NETWORK 15 2
B132S 2.34 HARDWARE 300 10
R18KY2 1.29 SOFTWARE 25 5
3KL8BY 6.37 HARDWARE 125 15
DY65DW 5.60 HARDWARE 45 5
DGTY23 4.55 HARDWARE 67 2
The following SAS program is submitted:
libname company 'SAS-data-library';
data hware inter soft;
set company.prices (keep = producttype price);
if price le 5.00;
if producttype = 'HARDWARE' then output HWARE;
else if producttype = 'NETWORK' then output INTER;
else if producttype = 'SOFTWARE' then output SOFT;
run;
How many observations does the HWARE data set contain?
A. 0
B. 2
C. 4
D. 6
Disclaimer
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.
Other brand and product names are trademarks of their respective companies.
This blog is not responsible for any kind of copyright violation. This blog just collects the links hosted or posted by other servers/people/search engines.The creator of this page or the ISP(s) hosting any content on this site take no responsibility for the way you use the information provided on this site.If anybody has any copyright claim on it and doesn’t wish the information provided to be shown on our site, please do respond to this email. We shall remove them off immediately. Any inconvenience is regretted. Please do mention your exact grievance/problems with respect to certain third party links. We assure you that appropriate action will be taken off. Thank you
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.
Other brand and product names are trademarks of their respective companies.
This blog is not responsible for any kind of copyright violation. This blog just collects the links hosted or posted by other servers/people/search engines.The creator of this page or the ISP(s) hosting any content on this site take no responsibility for the way you use the information provided on this site.If anybody has any copyright claim on it and doesn’t wish the information provided to be shown on our site, please do respond to this email. We shall remove them off immediately. Any inconvenience is regretted. Please do mention your exact grievance/problems with respect to certain third party links. We assure you that appropriate action will be taken off. Thank you
9 comments:
Answer: B
The if price le 5.00; limits the obs to the below obs out of which HARDWARE has two obs.
B132S 2.34 HARDWARE 300 10
R18KY2 1.29 SOFTWARE 25 5
DGTY23 4.55 HARDWARE 67 2
B. 2
Answer B
Answer is 2
Answer is B.
Filtering by subsetting IF statement (if price le 5.00;)
Resulting only 3 obs (as following) to compare whether PRODUCTTYPE equal to 'HARDWARE' or not.
B132S 2.34 HARDWARE 300 10
R18KY2 1.29 SOFTWARE 25 5
DGTY23 4.55 HARDWARE 67 2
B
b
Have any of you passed the Advanced SAS Certification by chance? I just started studying for the exam and was wondering if you all had any tips that helped you pass.
Some of my specific questions are at my blog below:
http://sascert3.blogspot.com/2013/03/sas-certified-advanced-programmer.html
Thanks in advance!
B
Post a Comment