Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 3 (10 Marks) Read in the raw data below into two separate data sets. DO NOT pre-order the data in the data step. Read

Question 3 (10 Marks)

Read in the raw data below into two separate data sets. DO NOT pre-order the data in the data step. Read in the data in the order that it is in, in the tables below.

Item Number

Name

Price

Store Location

333

PrintCrd

399

CPT

277

KeyPad

25

CPT

802

PnclHldr

12

DUR

417

PaprShrd

122

JHB

515

Basket

17

PE

Item Number

Name

RePrice

333

PrintCrd

386

277

KeyPad

25

802

PnclHldr

11

417

PaprShrd

135

Carry out the following steps in your program:

  • First run the code to create the two data sets (call these datasets data1 and data2).
  • Sort both data sets according to the item number variable in ascending order. (Do not create new data sets, overwrite the current data sets with the sorted data sets)
  • Merge the two data sets into a data set called "Merged_Data". Merge the data sets by the item number variable.
  • Delete observations from the merged data set if there is no "RePrice" indicated.
  • Print the data set "Merged_Data" to the screen.

DATA Provided

The data below is for the dataset called (data1)

data data1;

input ItemNumber Name $ Price StoreLoc $;

datalines;

333 PrintCrd399 CPT

277 KeyPad 25 CPT

802 PnclHldr 12 DUR

417 PaprShr 122 JHB

515 Basket 17 PE

;

run;

The data below is for the dataset called (data1)

data data2;

input ItemNumber Name $ RePrice;

datalines;

333 PrintCrd 386

277 KeyPad 25

802 PnclHldr 11

417 PaprShrd 135

;

run;

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Real Analysis

Authors: N L Carothers

1st Edition

1139632434, 9781139632430

More Books

Students also viewed these Mathematics questions

Question

8. What are the costs of collecting the information?

Answered: 1 week ago