Sentry Page Protection
Exercise (1-2)
Copy and run the code from the yellow box below: The INPUT48 data set contains three columns. Copy and paste the code below into your SAS editor: data groups; set input48; if upcase(cvar) in ('A','B','C','D','E','F','G') then group=1; else if upcase(cvar) in ('H','I','J','K','L','M','N') then group=2; else group=3; run; /* Calculate the average of X and Y by Group */ /* What is the average of X and Y for Group 2? */ proc means data=groups average maxdec=2; class group; var x y; if group=2; run; The program is intended to:
There are multiple errors in the program. These may be syntax errors, logic errors, or problems with the program structure. Logic errors might not produce messages in the log, but will cause the program to produce results different than intended. Correct the errors, run the program, and then use the results to answer the next 2 questions.
|