Explanation: The key word in this question is 'group'. Conditional processing can be performed using some iteration of BY, WHERE, and IF/THEN, but DO provides an opportunity to group statements together.
Question :
The following SAS program is submitted:
data test; set sasuser.employees; if 2 le years_service le 10 then amount = 1000; else if years_service gt 10 then amount = 2000; else amount = 0; amount_per_year = years_service / amount; run;
Which one of the following values does the variable AMOUNT_PER_YEAR contain if an employee has been with the company for one year?
Explanation: Amount is set to 0 and therefore amount_per_year is set to missing..
Try this data test; years_service=1; if 2 le years_service le 10 then amount = 1000; else if years_service gt 10 then amount = 2000; else amount = 0; amount_per_year = years_service / amount; run;
So amount_per_year = .
Question :
Which of the following statements is not true for list inputs?
Explanation: If missing values are represented by a special character that is not used as a separated of data, then the MISSOVER option is not required