Question: 4 . ( 2 0 points total ) Using Arrays for Repetitive Computations The SAS data set orders _ midyear is in the STA 3
points total Using Arrays for Repetitive Computations
The SAS data set ordersmidyear is in the STA subdirectory. The file contains monthly customer order data for the first half of the year. The Sales manager is considering a fivepercent 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 points Use a DATA step to read ordersmidyears and create a new data set, discountsales, that reflects the fivepercent discount.
Create an array, Mon, to access Month through Month using a SAS variable list construction MonthMonth
Use a DO loop to adjust each customer's monthly data by applying the fivepercent discount.
b 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.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
