Click on the Comments to view the Answers

Sunday, January 24, 2010

Base 26

Unless specified, which variables and data values are used to calculate statistics in the MEANS procedure?

A. non-missing numeric variable values only
B. missing numeric variable values and non-missing numeric variable values only
C. non-missing character variables and non-missing numeric variable values only
D. missing character variables, non-missing character variables, missing numeric variable values, and non-missing numeric variable


SASGuru said...

Answer A

Dutchy said...

It is B
Check this out. A missing numeric variable is accepted

data test;
infile datalines dsd;
length a b $20;
input a $ b $ c ;
label a=kolom_a b=kolom_b c=number;

dit is een,dit is twee,1
dit is drie,dit is twee,
dit is drie,dit is twee,2

proc print data=test;run;
proc means data=test;run;

Unknown said...

The answer of Dutchy is incorrect. SASGuru gave the right answer. That's because proc means does actually work when reading a missing numeric value from the data set, meaning that it doesn't produce an error and the report is generated. However, the missing values are not taken into accout when computing the statistics.
For instance, if the null values were considered, the example provided by Dutchy would have output 1 as average, because it would have counted 3 values and computed (1+2)/3 = 1. Instead, the mean is equal to 1.5 (try that yourself). That means that SAS considers only the two non-missing values and computes the average as (1+2)/2 = 1.5

Post a Comment

Technology Top Blogs On our way to 1,000,000 rss feeds - Blog Directory - blogarama - the blog directory Blog Directory

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