Assignment 1
DUE DATE: 1/21/03
For data sets in Examples 1 and 2, write two different input statements that will correctly read the data. For example 3, write one input statement, recode item 2, and sum the scale. Use PROC PRINT to verify that the data are being properly read and transformed. Turn in paper copy of all five programs (logs and outputs) before lab on Wednesday, the 21st.
1. First Example (1 point)
|
Col |
|
|
1-7 |
Responses to a seven-item survey |
|
9-10 |
Age |
|
12-14 |
IQ |
|
16 |
Sex 1=F, 2=M |
Data:
2234243 22 98 1
3424325 20 105 2
3242424 32 90 3
2. Second Example (1 point)
|
Col |
|
|
2-8 |
First name |
|
10-16 |
Last name |
|
21-27 |
Phone number |
|
29-31 |
GPA |
**Add a decimal point to the GPA so that Francis Smith has a 2.56 GPA.
Data:
Francis Smith 2234243 256
John Wolf 3424325 289
Jean Adams 3244242 300
Alice OConnel 3242323 383
3. Third Example (1 point)
|
Card (Line, record)1 |
|
|
1-9 |
Social Security Number |
|
10 |
Sex 1=F, 2=M |
|
11-12 |
Age |
|
Card 2 |
|
|
9-17 |
Nine different Likert type items 1=SD, 4=N, 7=SA |
|
Card 3 |
|
|
1-8 |
DOB |
Recode the second item so that 7 becomes 1, 1 becomes 7, etc.
Create a scale named ‘Total’ by calculating the sum of the 8 items.
Data:
2782818361
555454555
12161952
287989879 18
453555344
4281976