University of California Los Angeles Data Transformations Statistic Project

Question Description

using SAS,

two part questions,

Part I: Data Transformations

1. Calculating Statistics and Rounding

The data set orion.orders_midyear contains an observation for each customer, with the total retail value of the customer’s monthly orders for the first half of the year.

Partial Listing of orion.orders_midyear (24 Total Observations)

Customer_ID month1 month2 month3 month4 month5 month6

5 213.1 . 478.0 525.80 394.35 191.79

10 188.1 414.09 2876.9 3164.59 2373.44 169.29

11 78.2 . . . . 70.38

12 135.6 . 117.6 129.36 97.02 122.04

18 . . 29.4 32.34 24.26 .

24 93.0 265.80 . . . 83.70

27 310.7 782.90 . . . 279.63

31 1484.3 293.30 . . . 1335.87

34 642.5 . 86.3 94.93 71.20 578.25

a. Create a data set named work.sale_stats with three new variables for all months in which the customer placed an order.

The variable MonthAvg should contain the average.

The variable MonthMax should contain the maximum.

The variable MonthSum should contain the sum of values.

Round MonthAvg to the nearest integer.

Most SAS descriptive statistics functions automatically ignore missing values.

b. Print the variables Customer_ID, MonthAvg, MonthMax, and MonthSum. Add
an appropriate title.

Partial PROC PRINT Output (24 Total Observations)

Statistics on Months in which the Customer Placed an Order

Month Month Month

Customer_ID Avg Max Sum

5 361 525.80 1803.04

10 1531 3164.59 9186.41

11 74 78.20 148.58

12 120 135.60 601.62

18 29 32.34 86.00

2. Using the PUT and INPUT Functions

The data set orion.shipped contains details about each product shipped to one of Orion Star’s retail outlets in 2007.

Partial orion.shipped

Product_ID Ship_Date Quantity Price

240800200021 05JAN2011 2 $42.45

240800200035 04JAN2011 6 $12.15

240200100225 04JAN2011 2 $77.85

210200500002 09JAN2011 3 $5.70

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

Email
Registered Office Address: 2, Frederick Street, Kings Cross, London, WC1X 0ND, UNITED KINGDOM
Eminencepapers.com ©2023 All rights reserved. Terms of usePrivacy Policy Revision PolicyMoney Back Guarantee | Plagiarism Free Guarantee
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