Graphing Data with R by John Jay Hilfiger

Graphing Data with R by John Jay Hilfiger

Author:John Jay Hilfiger
Language: eng
Format: mobi, epub, pdf
Publisher: O’Reilly Media, Inc.
Published: 2015-04-25T04:00:00+00:00


11 | 046

12 | 00444588

13 | 000244568889

14 | 002224444589

15 | 00234466788889

16 | 00224589

17 | 002244566

18 | 045

Figure 6-1. Stem-and-leaf plot of sbp variable.

The display in Figure 6-1 shows all the blood pressures in the dataset. The column on the left-hand side of the display, including the numbers 11, 12, 13... contains the “stems.” The blood pressures are all three-digit numbers, so the stem contains the first two digits, and the “leaf” contains the last digit of each number. Reading from the top of the display, the numbers represented in the first stem are numbers beginning with “11” and the leaves are 0, 4, and 6. Thus, the numbers represented on the first line are: 110, 114, and 116. The next stem includes the numbers 120, 120, 124, 124, 124, 125, 128, and 128. We can see that there are exactly two systolic blood pressures of 170 and four of 158, but only one of 185.

Figure 6-1 shows the distribution of the data to be approximately symmetrical. There are about the same number of low blood pressures as there are high blood pressures and a relatively large number of blood pressures near the center of the distribution, i.e. blood pressures of about 130 to about 160. In this figure, the width of a stem is about 10, e.g. 110-119, 120-129, etc. If the width of the stem is changed, the shape of the graph may change as well. This can be done by adding another argument to the stem command. The argument scale=x, where x is a positive number, controls how wide each stem will be. For example, try this command:

stem(sbp$sbp, scale = 2)

The decimal point is 1 digit(s) to the right of the |



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.