CH7 exercise

CH7 exercise - STAT1303A Data Management 7. Combining Data...

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

View Full Document Right Arrow Icon
STAT1303A Data Management 7. Combining Data Sets Exercise 7 1. Print out the observations in the two data sets INVENTORY and NEWPRODUCTS. Next, create a new temporary SAS data set (UPDATED) containing all the observations in INVENTORY followed by all the observations in NEWPRODUCTS. Sort the resulting data set and print out the observations. (create two temporary SAS data sets for the sorted observations). Next, create a new, temporary SAS data set (UPDATED) by interleaving the two temporary, sorted SAS data sets. Print out the result. 3. Run the program here to create a SAS data set called MARKUP: data markup; input manuf : $10. markup; datalines; Cannondale 1.05 Trek 1.07 ; Combine this data set with the BICYCLES data set so that each observation in the BICYCLES data set now has a markup value of 1.05 or 1.07, depending on whether the bicycle is made by Cannondale or Trek. In this new data set (call it MARKUP_PRICES), create a new variable (NEWTOTAL) computed as UNITCOST times MARKUP. 4. Merge the PURCHASE and INVENTORY data sets to create a new, temporary SAS data set (PUR_PRICE) where the PRICE value found in the INVENTORY data set is added to each observation in the PURCHASE data set, based on the Model number (MODEL). There are some models in the INVENTORY data set that were not purchased (and, therefore, are not in the PURCHASE data set). Do not include these models in your new data set. Based on the variable QUANTITY in the PURCHASE data set, compute a total cost (TOTALCOST) equal to QUANTITY times PRICE in this data set as well. 5. Using the PURCHASE and INVENTORY data sets, provide a list of all models
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 05/04/2011.

Page1 / 4

CH7 exercise - STAT1303A Data Management 7. Combining Data...

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

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