Exercise 2.13, Continued
This is the SAS program that produces the correlation between lean
lean body mass and metabolic rate. It does this for each gender separately.
Note that in order for SAS to produce the correlations for each sex, the
data must be sorted by sex. The following is a copy of the SAS source file
2-13corr.sas
/* Exercise 2.13-Continuation, page 118.
Lean body mass is thought to influence metabolic rate.
This program produces a scatter plot of metabolic rate (explanatory) vs.
lean body mass (response). The plot uses a different plotting symbol
for men (red squares) and women (black circles).
Results:
There is clearly a positive linear relationship between the two variables.
This is true for both genders. For the most part, men have both higher
lean body mass values and higher metabolic rate values. Although there
are too few male observations, it would appear that the variation in male
metabolic rate is larger than it is for females.
*/
/**
The calculation of the correlation between lean body mass and
metabolic rate further supports their positive linear association.
**/
options nodate;
data metabolic;
input subject sex $ mass rate;
datalines;
1 M 62.0 1792
2 M 62.9 1666
3 F 36.1 995
4 F 54.6 1425
5 F 48.5 1396
6 F 42.0 1418
7 M 47.4 1362
8 F 50.6 1502
9 F 42.0 1256
10 M 48.7 1614
11 F 40.3 1189
12 F 33.1 913
13 M 51.9 1460
14 F 42.4 1124
15 F 34.5 1052
16 F 51.1 1347
17 F 41.2 1204
18 M 51.9 1867
19 M 46.9 1439
;
proc sort data=metabolic;
by sex;
run;
proc corr data=metabolic;
title 'Correlation Between Metabolic Rate and Lean Body Mass';
var rate mass;
by sex;
run;