Exercise_Week6_Answer - MATH2871 DATA MANAGEMENT FOR...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
MATH2871 DATA MANAGEMENT FOR STATISTICAL ANALYSIS SEMESTER 2, 2010 Lab exercise Week6 1. Cleaning DATA from orion.price_current a. Retrieve the following starter program. b. Add a DATA step prior to the PROC steps to read orion.price_current to create Work.price_current . In the DATA step, include two conditional IF- THEN statements to correct the following invalid data: Variable Obs Invalid value Correct value Reference variable Unit_Sales_Price 41 5730 57.30 Product_ID=220200200022 Unit_Sales_Price 103 . 41.20 Product_ID=240200100056 c. Submit the program. Verify that Unit_Sales_Price is in the numeric range of 3 - 800. The prices are in the range of 3-800. Output of PROC UNIVARIATE proc means data =work.price_current n min max ; var Unit_Sales_Price; run ; proc univariate data =work.price_current; var Unit_Sales_Price; run ; data price_current; set orion.price_current; if Product_ID= 220200200022 then Unit_Sales_Price= 57.30 ; else if Product_ID= 240200100056 then Unit_Sales_Price= 41.20 ; run ; ----Lowest---- ----Highest---- Value Obs Value Obs 6.5 6 519.3 67 8.5 76 533.2 126 8.9 73 536.3 132 10.5 30 568.1 68 11.1 24 630.4 127
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Output of PROC MEAN 2. Creating Three New Variables a. Write a DATA step to read orion.customer to create Work.birthday. b. In the DATA step, create three new variables,
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 06/12/2011 for the course ASB 1001,2522, taught by Professor Nicole during the One '09 term at University of New South Wales.

Page1 / 5

Exercise_Week6_Answer - MATH2871 DATA MANAGEMENT FOR...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online