Need help with your Discussion

Get a timely done, PLAGIARISM-FREE paper
from our highly-qualified writers!

glass
pen
clip
papers
heaphones

UCLA Processing Data Iteratively & Restructuring a Data Set Programming Exercise

UCLA Processing Data Iteratively & Restructuring a Data Set Programming Exercise

UCLA Processing Data Iteratively & Restructuring a Data Set Programming Exercise

Question Description

There are 3 parts , using SAS to produce the answer , save as three files, one program file, one output file, and one log file for the entire assignment.

see attached file for more questions.

1. Using an Iterative DO Statement with a Conditional Clause

Orion’s income last year was $50,000,000 and expenses totaled $38,750,000. Income is projected
to increase at 1% per year and expenses are expected to increase at 2% per year.

a. Create a SAS data set named work.expenses that contains each year’s projected income
and expenses.

Use an iterative DO statement with a conditional clause.

Stop the loop when expenses exceed income or after 30 years, whichever comes first.

b. Print the results and format Income and Expenses with a dollar sign and two decimal places.

Hint: Recall that an iterative DO statement with a conditional clause produces different results with DO WHILE and DO UNTIL statements. The results below were generated using a DO UNTIL statement.

PROC PRINT Output

Obs Income Expenses Year

1 $64,762,815.75 $64,844,951.93 26

2. Using Arrays for Repetitive Computations

Monthly customer order data for the first half of the year is stored in the data set orion.orders_midyear. Orion Star Sales management is considering a 10% price decrease during the first three months of the upcoming year. Management wants to see how such a discount would affect this year’s sales.

Partial orion.orders_midyear

Customer_ID Month1 Month2 Month3 Month4 Month5 Month6

5 213.10 . 478.0 525.80 394.35 191.79

10 188.10 414.09 2876.9 3164.59 2373.44 169.29

11 78.20 . . . . 70.38

12 135.60 . 117.6 129.36 97.02 122.04

18 . . 29.4 32.34 24.26 .

a. Create a data set, special_offer, including the 10% discount in months 1 through 3.

Create an array, Mon, to access Month1 through Month3.

Use a DO loop to adjust each customer’s monthly data to include the 10% discount (Month1 through Month3 only).

Create three new variables:

Total_Sales – the total of current sales over the six months

Projected_Sales – the total of the adjusted sales over the six months (including the
three discounted months)

Difference – the difference between Total_Sales and Projected_Sales

Keep only the new variables: Total_Sales, Projected_Sales, and Difference.

b. Print the resulting data set and verify your results.

Suppress the session start date, page number, and observation column.

Add an appropriate title.

Use the SUM statement to display a total for the Difference variable.

Use the DOLLAR. format for all variables.

Partial PROC PRINT Output (24 Total Observations)

Total Sales with 10% Discount in First Three Months

Total_ Projected_

Sales Sales Difference

$1,803.04 $1,733.93 $69.11

$9,186.41 $8,838.50 $347.91

$148.58 $140.76 $7.82

$601.62 $576.30 $25.32

$1,518.95 $1,467.02 $51.93

==========

$1,550.74

Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."

Order Solution Now

Our Service Charter


1. Professional & Expert Writers: Eminence Papers only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed of papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by Eminence Papers are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. Eminence Papers are known for the timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit in all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At Eminence Papers, we have put in place a team of experts who answer all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.

We Can Write It for You! Enjoy 20% OFF on This Order. Use Code SAVE20

Stuck with your Assignment?

Enjoy 20% OFF Today
Use code SAVE20