100% Guaranteed Results


Stat 657 Assignment 10 – SAS Solved
$ 29.99
Category:

Description

5/5 – (1 vote)

Scope:
This exercise reinforces concepts covered in the first 16 lectures and brings together a large number of macro techniques into one assignment. You should be able to find examples in the lectures for almost every technique you need. However, it will be up to you to locate them and put them all together. This assignment will use the files in the Orion library supplied with the SQL portion of this class. Include the appropriate libref in your program. You will create two SAS programs in this assignment, both of which will be submitted to WebAssign.
Specific Instructions for this Assignment:
2. Start a new SAS program complete with full header block and comment blocks for the remainder of this assignment.
3. At the beginning of your program, set a system option that writes macro variable values to the SAS log as they are resolved and an option writes to the SAS log the text that is generated by macro execution.
5. If you do not already have A&M in the path to your output files, create a new folder named
6. Paste the line below into your program:
%colormac(help);

The sole purpose of this step is to confirm that the previous steps have been completed successfully. If everything is set up correctly, this will write, without any errors or warnings, a few lines of information about Color Utility macros to the log. (NOTE: If you do not have this set up correctly you will probably need to restart your SAS session in order to get your corrections to take effect.)
9. Use a data step to create a new table called salary_f9605 based on the Female1996 dataset created in step 7. You will only need the employee_id, employee_name, salary fields in this table.
a. One objective of this data step is to create two macro variables that contain the employee ID and salary respectively of the highest paid employee. You can follow these instructions to create the macro variables: On the first observation of the data set, initialize the two macro variables with the employee ID and the salary of the first employee in the dataset. Use _N_=1 to determine the first row. For each additional row, compare the salary with the value stored in the salary macro variable. You must use symget instead of a macro reference to read the value of the salary macro variable. If the current salary is higher, replace the id and salary macro values with the values from the current row. When the data step is complete your macros should contain the id and salary of the highest paid employee.
b. Create a series of macro variables whose names end with the employee_id number. The value of the macro variables should be the corresponding employee name in the format of first name then last name separated by a space. Notes in the log about character or number conversion will be allowed for this assignment. The following is an example of a macro variable similar to the macro variables created in this step:

10. Use the print procedure to print the data portion of the salary_f9605 dataset. Use the macro variables created above to automatically populate the title. Use an indirect macro reference to display the name of the highest paid employee and a macro reference to display the highest salary in the second line of the title. Your output should match the sample output posted on eCampus.
11. Four PDF files must be uploaded to WebAssign. Convert your log, main program and the autocall macro program to PDF files. Name the PDF that contains your macro program with the same name as the SAS program except with the pdf extension. The fourth file will contain all the requested output from ODS PDF. The program must contain a completed header block and comment blocks for each step. Options must be set so that, to the extent you have been taught to control it, the output looks like that in the Assignment output posted on eCampus.

Reviews

There are no reviews yet.

Be the first to review “Stat 657 Assignment 10 – SAS Solved”

Your email address will not be published. Required fields are marked *

Related products