You are on page 1of 2

MPH 603- Health Informatics

Homework 4 (Due: November 19, 2021)

Question 1

a) First, open and read the tomhs.dat data set. The tomhs data dictionary that
accompanies the data set gives the list of variables on the file, the locations
(column positions) of the variables on the file, the description of the variables
and whether they are character or numeric.
b) Write a program to read the variables ptid, clinic, group, age and sex and
create a data set containing these variables (name the data set with a name
of your preference). Use the POINTER(@)-INFORMAT method of reading the
data.
c) Display all the variables using PROC PRINT. Using the OBS data set option on
the procedure limit the number of observations displayed to 10.
d) Using PROC MEANS display the average age of all patients. What is the
average age?
e) Using PROC UNIVARIATE, check the distribution of the variable age and
obtain a histogram plot. How does the distribution looks like?
f) Use PROC FREQ to display the number of men and women in the study. How
many men and how many women are in the study?
You can submit the answers as comments within the programs

Question 2
a) Create a SAS dataset called wtsbp reading the following variables from
tomhs.dat: ptid, age, sex, marital, wtbl, wt6, sbpbl, sbp6.
b) Compute two new variables in the DATA step: change in weight and change
in systolic blood pressure. Call the variables wtdif and sbpdif. The formula
for wtdif is:

wtdif = wt6 – wtbl; Define sbpdif in a similar manner.

Note: by computing the differences in this way negative values will indicate a
decrease from baseline and positive values will indicate an increase from baseline.
c) Use a procedure that displays the counts and means for change in weight and
change in blood pressure. What was the average weight change? How many
missing values are there for wtdif and sbpdif? Using PROC SGPLOT create a
histogram for change in weight.
d) Use a procedure that displays the means in part 3 (Quest 2.c) separately for
men and women. Which sex had the greatest average decrease in weight?
Using PROC SGPLOT create side-by-side box plots of decrease in weight for
men and women.

You might also like