1
$\begingroup$

This data when I plot - 60 85 72 59 37 75 93 7 98 63 41 90 5 17 97

stem(data)

 0 | 577
 2 | 7
 4 | 19
 6 | 0325
 8 | 50378

Now If I reconstruct data it is 5, 7, 7, 27, 60, 63, 62, 65, 85, 80, 83, 87, 88

This does not produce the input in reverse.

$\endgroup$
2
$\begingroup$

With the default scale, you see that numbers left of the bar go up by two - hence anything after the 4 is forty-something or fifty-something:

> stem(d,scale=1)

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

  0 | 577
  2 | 7
  4 | 19
  6 | 0325
  8 | 50378

Using scale=2, you'll see numbers left of the bar go up by one, so now you can get exact reconstruction of your input, since you input integers:

> stem(d,scale=2)

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

  0 | 57
  1 | 7
  2 | 
  3 | 7
  4 | 1
  5 | 9
  6 | 03
  7 | 25
  8 | 5
  9 | 0378

Going further you can even split it by first and second five within each decade:

> stem(d,scale=4)

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

  0 | 57
  1 | 
  1 | 7
  2 | 
  2 | 
  3 | 
  3 | 7
  4 | 1
  4 | 
  5 | 
  5 | 9
  6 | 03
  6 | 
  7 | 2
  7 | 5
  8 | 
  8 | 5
  9 | 03
  9 | 78

Stem plots do not always guarantee you can reproduce the data by reversing the process, and that's not what they're for.

$\endgroup$
-1
$\begingroup$

try this S=c(60, 85, 72, 59, 37, 75, 93, 7, 98, 63, 41, 90 ,5 ,17 ,97) ;stem(S,scale = 2) A value of scale = 2 will cause the plot to be roughly twice as long as the default.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.