Question : Unless specified, which variables and data values are used to calculate statistics in the MEANS procedure? 1. non-missing numeric variable values only 2. missing numeric variable values and non-missing numeric variable values only 3. Access Mostly Uused Products by 50000+ Subscribers 4. missing character variables, non-missing character variables, missing numeric variable values, and non-missing numeric variablevalues
Explanation: : just verified it in SAS by running a program below:
data shoes; input shoe_number val; datalines; 6 2 7 . 8 4 9 8 ; proc means data = shoes; run;
Below is the output where you can clearly see for variable val N is 3 not 4, so proc means only consider numeric non-missing values for that variable to calculate its statistics, so answer is A. Variable N Mean --------------------------------- shoe_number 4 7.5000000 val 3 4.6666667 --------------------------------- proc means excluded the missing value of val and therefore computed the mean with 3 obs:(2+4+8)/3=4.66. SAS did not consider the missing value. However, if we specify in the program an option to go with the means proc, the result willbe different.
proc means, and in general other SAS procedures that perform calculations, will not factor in missing values. However, you can specify for missing values to affect proc means by using option MISSING.
Question : The following SAS program is submitted: proc sort data = sasuser.houses out = houses; by style; run; proc print data = houses;
Explanation: C and D options are same only diff is that there is style variable in var... But, if the style variable is present in id statement, you don't have to mention it in var statement, else you will get 2 style variable in the output, but since there is just 1 style column present ans is C and not D..
Question :
You have executed following SAS DATA step as on Monday, April 01, 2000: data joiners; set joinee; join_date = today(); run; Which one of the following is the value of the variable JOIN_DATE in the output data set?
1. This will be a character string with the value '04/01/2000' 2. This will be a character string with the value 'Monday, April 01, 2000' 3. Access Mostly Uused Products by 50000+ Subscribers 4. This will be a numeric value 04252000, representing the SAS date for April 01, 2000