Question: 4 . ( 2 0 points total ) Using Arrays for Repetitive Computations The SAS data set orders _ midyear is in the STA 3

4.(20 points total) Using Arrays for Repetitive Computations
The SAS data set orders_midyear is in the STA3024 subdirectory. The file contains monthly customer order data for the first half of the year. The Sales manager is considering a five-percent price decrease next year. She wants to see how such a discount would affect this year's income by applying it to the midyear data.
a.(15 points) Use a DATA step to read orders_midyears and create a new data set, discount_sales, that reflects the five-percent discount.
Create an array, Mon, to access Month1 through Month6 using a SAS variable list construction (Month1-Month6).
Use a DO loop to adjust each customer's monthly data by applying the five-percent discount.
b.(5 points) Use a PROC PRINT step to display the resulting data set and verify your results. Use the DOLLAR. format for the monthly sales amounts.
4 . ( 2 0 points total ) Using Arrays for

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!