Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

6. Subsetting Observations Based on Three Conditions a. Write a DATA step to read orion.orders to create Work.delays. b. Create the new variable Order_Month, which

image text in transcribed

6. Subsetting Observations Based on Three Conditions a. Write a DATA step to read orion.orders to create Work.delays. b. Create the new variable Order_Month, which is equal to the month of Order_Date. Manipulating data - 2% c. Use a WHERE statement and a subsetting IF statement to select only the observations that meet all of the following conditions: Delivery_Date values that are more than four days beyond Order_Date Employee_ID values that are equal to 99999999 Order_Month values occurring in August d. Write a PROC PRINT step to create the following report: Order_ Order_ Delivery_ Order_ Order_ID Type Employee_ID Customer_ID Date Month Obs Date 1 1231227910 2 99999999 70187 13AUG 2003 18AUG2003 8 2 1231270767 3 99999999 52 26AUG 2003 8 3 2 99999999 16 20AUG 2003 27AUG 2003 29AUG 2003 1231305521 1231317443 8 04SEP 2003 03SEP 2003 4 2 99999999 61 8 5 W 3 2550 10AUG 2004 8 1233484749 1233514453 99999999 99999999 15AUG 2004 20AUG 2004 6 3 70201 15AUG 2004 8 7 3 8 1236673732 1240051245 99999999 99999999 9 10AUG 2005 71 30AUG 2006 15AUG 2005 05SEP 2006 8 3 8 9 1243165497 3 99999999 70201 24AUG 2007 29AUG 2007 8 6. Subsetting Observations Based on Three Conditions a. Write a DATA step to read orion.orders to create Work.delays. b. Create the new variable Order_Month, which is equal to the month of Order_Date. Manipulating data - 2% c. Use a WHERE statement and a subsetting IF statement to select only the observations that meet all of the following conditions: Delivery_Date values that are more than four days beyond Order_Date Employee_ID values that are equal to 99999999 Order_Month values occurring in August d. Write a PROC PRINT step to create the following report: Order_ Order_ Delivery_ Order_ Order_ID Type Employee_ID Customer_ID Date Month Obs Date 1 1231227910 2 99999999 70187 13AUG 2003 18AUG2003 8 2 1231270767 3 99999999 52 26AUG 2003 8 3 2 99999999 16 20AUG 2003 27AUG 2003 29AUG 2003 1231305521 1231317443 8 04SEP 2003 03SEP 2003 4 2 99999999 61 8 5 W 3 2550 10AUG 2004 8 1233484749 1233514453 99999999 99999999 15AUG 2004 20AUG 2004 6 3 70201 15AUG 2004 8 7 3 8 1236673732 1240051245 99999999 99999999 9 10AUG 2005 71 30AUG 2006 15AUG 2005 05SEP 2006 8 3 8 9 1243165497 3 99999999 70201 24AUG 2007 29AUG 2007 8

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

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

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Finance questions