Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

SAS coding If you run this DATA step, what observations does the data set bonuse

ID: 3332437 • Letter: S

Question

SAS coding

If you run this DATA step, what observations does the data set bonuses contain?

data bonuses;

   merge managers staff;

   by EmpID;

run;

A. all of the observations from managers, and only those observations from staff with matching values for EmpID

B. all of the observations from staff, and only those observations from managers with matching values

for EmpID

C. all observations from staff and all observations from managers, whether or not they have matching values

D.only those observations from staff and managerswith matching values for EmpID

Explanation / Answer

C. all observations from staff and all observations from managers, whether or not they have matching values

We can keep only the observations with matched values for the common variable. That is achieved by using the IN statement. The merge statement of the SAS program needs to be changed.