Answered step by step
Verified Expert Solution
Question
...
1 Approved Answer
(30 pts) SAS PROC SQL can be very flexible and powerful when creating data tables and variables. However, SAS data steps can be more convenient
(30 pts)SAS PROC SQL can be very flexible and powerful when creating data tables and variables. However, SAS data steps can be more convenient in some cases, especially when creating multiple variables using conditional logics. We will reuse the salaries.xlsxdata file. After reading it in, use PROC SQL for the following tasks.
- (Case logic) Suppose the variable "salary" is annual income, and there are 12 months in a year. We want to compute income for each month, then compute tax for each month (income less than 5000 tax rate: 0.16, Income between 5000 and 10000 tax rate: 0.18, Income greater than 10000 tax rate: 0.2);
- Use the appropriate method to find the highest 'salary' in each 'grade' level, then calculate the total amount of salary for each 'grade' level, after that, to find which 'grade' level has the highest total amount of salary.
- Then, add a bonus variable of $1,000.00 for employees whose "job title" (existing variable) contains the words 'leads', 'managers', or 'directors', and $200 for all other "job titles".
Step by Step Solution
There are 3 Steps involved in it
Step: 1
![blur-text-image](https://dsd5zvtm8ll6.cloudfront.net/includes/images/document_product_info/blur-text-image.webp)
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
![blur-text-image](https://dsd5zvtm8ll6.cloudfront.net/includes/images/document_product_info/blur-subtext-image.webp)
Step: 3
![blur-text-image](https://dsd5zvtm8ll6.cloudfront.net/includes/images/document_product_info/blur-subtext-image.webp)
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started