This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: STAT1303A Data Management Assignment 2 Due Date: 29th October, 2009 1. The variables in the data set DATA1 are given in the followings. Variable Description Type and Codes Code of Missing ID ID number Numeric NAME Name Character GENDER Gender Character &F¡= Female &M¡= Male CDOB Date of birth Character In a format DD/MM/YYYY CVISIT Visit date Character In a format DD/MM/YYYY Q1 Numeric 0 = No (Skip Q2 and Q3) 1 = Yes Q2 Numeric 99 if skipped Q3 Character &NA¡if skipped W Character &99¡ X Numeric 99 Y Numeric 99 Create a new data set DATA2 from DATA1 based on the following requirement. Hand in the requested output and the SAS programs used. (a) Some of the values in W, X and Y are missing. Convert the missing values into the codes of missing as stated in the table. (b) Create a variable Z which is given as Z = Y & Exp(X). (c) Create a variable T which is T = Y & X 2 when Z is greater than or equal to 20 and is T = p Y + X 2 when Z is less than 20. (d) Some of the values for GENDER were entered as ¢f£and ¢m£. Convert all values into ¢F£and ¢M£, respectively. (e) For certain SAS procedures, a character ID variable is needed. Convert the numeric ID variable into a character variable by concatenating a letter ¢c£in front of the ID number. Remove any space in the ¤nal values....
View Full Document
This document was uploaded on 05/04/2011.
- Spring '11