Académique Documents
Professionnel Documents
Culture Documents
GENDER
HEIGHT
DATE
POINTS
Gender
Height in inches
Date of game
Number of points
5
7
10
19
1
2
8
2
Char (M or F)
Numeric
MM/DD/YY
Numeric
MID-SIZED HONDA
MID-SIZED FORD
ACCORD
TAURUS
26
20
5
3
Cold
Flu
Fracture
Routine Physical
Heart Problem
Lung Disorder
Abdominal Pain
Laceration
URI
Lyme Disease
Ear Ache
RX Codes:
1
2
3
4
5
6
7
8
Immunization
Casting
Beta Blocker
ACE Inhibitor
Antihistamine
Ibuprofen
Aspirin
Antibiotic
00909099507078128082
1770818951008213008086
4450919950308814408826
77709129507086100062
0091015950106612208257
0781101950509019011073
033101095100581200708
/* page 209 of The SAS Workbook */
/* CLINICAL.DTA Data File Description */
Starting
Variable
Description
Column
Length
Format
Codes
---------------------------------------------------------------------ID
Subject ID
1
3
Char
GENDER
Gender
4
1
Char
M,F
DOB
Date of Birth
5
6
MMDDYY
VISIT
Visit Date
11
6
MMDDYY
PRIM_DX
Primary DX Code
17
2
Char
(see list)
SEC_DX
Secondary DX Code
19
2
Char
"
HR
Heart Rate
21
3
Numeric
SBP
Systolic Blood Pres. 24
3
Numeric
DBP
Diastolic Blood Pres. 27
3
Numeric
VITAMINS
Pt. Taking Vitamins? 30
1
Char
1=Yes, 0=No
PREGNANT
Is PT Pregnant?
31
1
Char
1=Yes, 0=No
DX Codes:
01
02
03
04
05
06
Cold
Flu
Fracture
Routine Physical
Heart Problem
Lung Disorder
07
08
09
10
11
Abdominal Pain
Laceration
Immunization
Lyme Disease
Ear Ache
812M10116710109508 06613408210
338M07289007129511 08210607010
959F121565111195070908817609810
007F04196402069504 07410606411
291M080975060395011106813208600
984F12237905159502 07409606201
669M02287707079509 06214009000
999F01019502019401 08018810200
229F06188009189509 07410406010
885M091085101595110908811408400
178M030491071695010908810206800
F010190010696050607012008000
966F040591081695010909205403610
782M060710051895050608822018000
374M05068807229504 08312007000
285F06077009119511 08416009600
884M07121609119505 07819014000
258M08098211189504 07214409800
733F090978030495070207412007011
449M10103110189501
10
941F101070101995030408819011001
/* pages 211-212 of The SAS Workbook */
/* Program to Create the SAS Data Set CLINICAL */
*--------------------------------------------------------------------*
| Program Name: CLINICAL.SAS in subdirectory C:\WORKBOOK
|
| Purpose: To Create a Permanent SAS data set called CLINICAL from
|
|
the raw data file CLINICAL.DTA along with permanent
|
|
formats. Both the SAS data set and permanent formats are |
|
to be stored in the subdirectory C:\WORKBOOK
|
*--------------------------------------------------------------------* ;
LIBNAME WORKBOOK 'C:\WORKBOOK';
OPTIONS PAGENO=1 NOCENTER FMTSEARCH=(WORKBOOK);
FILENAME CLIN 'C:\WORKBOOK\CLINICAL.DTA';
PROC FORMAT LIBRARY=WORKBOOK;
VALUE $GENDER 'M' = 'Male'
'F' = 'Female';
VALUE $DXCODES '01' = 'Cold'
'02' = 'Flu'
'03' = 'Fracture'
'04' = 'Routine Physical'
'05' = 'Heart Problem'
'06' = 'Lung Disorder'
'07' = 'Abdominal Pain'
'08' = 'Laceration'
'09' = 'Immunization'
'10' = 'Lyme disease'
'11' = 'Ear Ache';
VALUE $YESNO '0' = 'No'
'1' = 'Yes';
RUN;
DATA WORKBOOK.CLINICAL;
INFILE CLIN;
INPUT
@1
ID
@4
GENDER
@5
DOB
@11 VISIT
@17 PRIM_DX
@19 SEC_DX
@21 HR
@24 SBP
@27 DBP
@30 VITAMINS
@31 PREGNANT
LABEL
ID
GENDER
DOB
VISIT
PRIM_DX
SEC_DX
HR
SBP
DBP
VITAMINS
PREGNANT
=
=
=
=
=
=
=
=
=
=
=
$3.
$1.
MMDDYY6.
MMDDYY6.
$2.
$2.
3.
3.
3.
$1.
$1.;
'Pt. Number'
'Gender'
'Date of Birth'
'Visit Date'
'Primary DX'
'Secondary DX'
'Heart Rate'
'Systolic Blood Pressure'
'Diastolic Blood Pressure'
'Pt. Taking Vitamins?'
'Is Pt. Pregnant?';
1
1234567890
---------0011001
0021111
0031110
0040010
0050010
0060110
0070011
0081001
0090000
0101011
0110000
0120101
0130100
0141111
0150101
0161001
0170011
0180010
0190110
0201011
0210110
0220010
0231110
0240001
0251011
0261110
0270110
0280110
0291100
0300100
0310001
0320010
0330001
0340100
0350010
0360001
/* page 214 of The SAS Workbook */
/* DEMOG1.DTA and DEMOG2.DTA Data File Descriptions */
Starting
Variable
Description
Column
Length
Type
Codes
--------------------------------------------------------------------------ID
Subject ID
1
3
Char
DOB
Date of Birth
4
6
MMDDYY
GENDER
Gender
10
1
Char
M=Male,
F=Female
STATE
State of Residence 11
2
Char
EMPLOYED
Employed?
13
1
Char
1=Yes, 0=No
/* Listing of Raw Data from DEMOG1.DTA */
1
2
3
4
5
6
123456789012345678901234567890123456789012345678901234567890
-----------------------------------------------------------178102146MNJ1
982110166FNY0
723030452MNJ1
258101074FNY1
139122550FNJ0
145010444MNY1
/* Listing of Raw Data from DEMOG2.DTA */
1
2
3
4
5
6
123456789012345678901234567890123456789012345678901234567890
-----------------------------------------------------------559110168FNY0
714010244MNH0
934052890FNJ0
569112850FNY1
/* page 215 of The SAS Workbook */
/* DIALYSIS.DTA Data File Description */
Starting
Variable Description
Column
Length Type
Codes
--------------------------------------------------------------------------ID
Subject ID
1
3
Char
GENDER
Gender
4
1
Char
M=Male,
F=Female
DOB
Date of Birth
5
8
MM/DD/YY
VISIT
Visit Number
13
1
Numeric
HR
Heart Rate
14
3
Numeric
SBP
Systolic Blood Pressure 17
3
Numeric
DBP
Diastolic Blood Pressure 20
3
Numeric
/* Listing of Raw Data from DIALYSIS.DTA */
1
2
3
123456789012345678901234567890
-----------------------------001M10/21/461080140080
001
2082142084
001
3078138078
002F11/17/221066120070
003F04/04/181084150090
003
2088152102
004M12/21/101072120074
004
2070122076
004
3078128078
005F08/02/311092180110
006
1076180112
006
2080178090