Practical Data Management and Statistical Computing (BioEp691F)

Contacts

Outline
Assignments

Resources


Outline: Lec1 Lec2 Lec3 Lec4 Lec5 Lec6 Lec7 Lec8 Lec9 Lec10
Lectures: Lec1 Lec2 Lec3 Lec4 Lec5 Lec6 Lec7 Lec8 Lec9 Lec10
Lecture 9

1. Reading ASCII data with more than one line per record.

Data may be entered with more than one line per record. A brief description of such data comes from the Shock Research Unit at the University of Southern California, Los Angeles, California. Data on many physiological variables were collected successively in time on each patient. These data represent a special subset of the data that was extracted for the purpose of exercise. Initial measurements (measurements upon admission) and final measurements on the same variables (measurements just before death or discharge) were collected on 113 critically ill patients. We first save these data in an ASCII file called shock.txt on the C:\DATA directory, and read the data with the program dmes99p10.sas. The program illustrates:


2. Saving a permanent set of Formats

Formats for categorical variables can be saved in a permanent SAS data set. We illustrate this here for the SHOCK data. The program dmes99p11.sas illustrates:

The formats can be read in with a CNTLIN option in PROC FORMAT. For example, in another SAS session, prior to using the formats with a data set, include the format procedure:

PROC FORMAT CNTLIN=old.datf;

where old specifies the path to the SAS format data set named datf.sd2.


3. Setting Formats for Character Variables.

There are two differences for formats for character variables:

Example:

PROC FORMAT;

VALUE $sex
"F"="Female"

"M"=Male";

 

 



Produced and maintained by the Dept of BioEpi at UMASS
Send comments or questions about this web site to Ed Stanek
Email:
stanek@schoolph.umass.edu
\be691f\web\webready\lec9.html
Lst Update: 10/3/99