tutor7 - name order. 2. There are 2 data files, one from...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
The University of Hong Kong Department of statistics and actuarial science STAT1303 Data Management Tutorial 7 Combining data sets 1. The class test results are listed in score.dat. The labels for the four columns are Name, Gender, Test one and Test two. a. Create a SAS data set called TEST from these data. b. Create a subset of these data for males only. Call it MALE_TEST. c. Create another subset of TEST for all females who have Test two greater than or equal to 80. Call it GOOD_TWO_F. d. The data in dob.dat on the children are included. The file contains names and date of birth (stored in the format mmddyy). i) Create a SAS data set called BIRTH from these data. ii) Merge the data sets, TEST and BIRTH, (called the merged data set TB), including only those names that are present in the TEST data set. iii) Print out a list showing name, gender, and date of birth. Have this list in
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: name order. 2. There are 2 data files, one from the year 2000 (year2000.dat) and the other from the year 2001(year2001.dat). a. Create a SAS data set from each file (called YEAR2000 and YEAR2001, respectively) b. Combine the data from each data set into a single file (call it BOTH). Create a new variable YR which is equal to the specific year (2000 or 2001). c. Combine the TB data set with the data set BOTH. Call the resulting data set TBB. Include only those names with data in both data sets. d. Print a list of the data set TBB. 3. New information on the test scores is provided. Jack now has a 60 for Test one; Mike has 95 for Test two; a. Create an update data set of this new information. b. Update the TEST file. Call the updated data set TEST_2 and provide a listing....
View Full Document

Ask a homework question - tutors are online