Tag Archives: Correlogram

The multiple faceted correlogram

str(Baseball)
## 'data.frame':    322 obs. of  25 variables:
##  $ name1   : chr  "Al" "Alan" "Alan" "Alan" ...
##  $ name2   : chr  "Newman" "Ashby" "Trammell" "Wiggins" ...
##  $ atbat86 : int  185 315 574 239 202 594 479 496 401 321 ...
##  $ hits86  : int  37 81 159 60 53 169 130 141 92 87 ...
##  $ homer86 : int  1 7 21 0 4 4 18 20 17 10 ...
##  $ runs86  : int  23 24 107 30 31 74 66 65 49 39 ...
##  $ rbi86   : int  8 38 75 11 26 51 72 78 66 42 ...
##  $ walks86 : int  21 39 59 22 27 35 76 37 65 30 ...
##  $ years   : int  2 14 10 6 9 11 3 11 13 2 ...
##  $ atbat   : int  214 3449 4631 1941 1876 4408 1624 5628 5206 396 ...
##  $ hits    : int  42 835 1300 510 467 1133 457 1575 1332 101 ...
##  $ homeruns: int  1 69 90 4 15 19 63 225 253 12 ...
##  $ runs    : int  30 321 702 309 192 501 224 828 784 48 ...
##  $ rbi     : int  9 414 504 103 186 336 266 838 890 46 ...
##  $ walks   : int  24 375 488 207 161 194 263 354 866 33 ...
##  $ league86: Factor w/ 2 levels "A","N": 2 2 1 1 2 1 1 2 1 2 ...
##  $ div86   : Factor w/ 2 levels "E","W": 1 2 1 1 2 2 2 1 1 1 ...
##  $ team86  : Factor w/ 24 levels "Atl","Bal","Bos",..: 14 9 8 2 11 16 21 14 7 14 ...
##  $ posit86 : Factor w/ 25 levels "13","1B","1O",..: 5 11 24 5 11 24 2 22 15 2 ...
##  $ outs86  : int  76 632 238 121 304 282 880 200 0 805 ...
##  $ assist86: int  127 43 445 151 45 421 82 11 0 40 ...
##  $ error86 : int  7 10 22 6 11 25 14 3 0 4 ...
##  $ sal87   : num  70 475 517 700 512 ...
##  $ league87: Factor w/ 2 levels "A","N": 1 2 1 1 2 1 1 2 1 2 ...
##  $ team87  : Factor w/ 24 levels "Atl","Bal","Bos",..: 13 9 8 2 11 16 21 5 7 14 ...
head(Baseball)
##     name1    name2 atbat86 hits86 homer86 runs86 rbi86 walks86 years atbat
## 1      Al   Newman     185     37       1     23     8      21     2   214
## 2    Alan    Ashby     315     81       7     24    38      39    14  3449
## 3    Alan Trammell     574    159      21    107    75      59    10  4631
## 4    Alan  Wiggins     239     60       0     30    11      22     6  1941
## 5    Alex  Trevino     202     53       4     31    26      27     9  1876
## 6 Alfredo  Griffin     594    169       4     74    51      35    11  4408
##   hits homeruns runs rbi walks league86 div86 team86 posit86 outs86
## 1   42        1   30   9    24        N     E    Mon      2B     76
## 2  835       69  321 414   375        N     W    Hou       C    632
## 3 1300       90  702 504   488        A     E    Det      SS    238
## 4  510        4  309 103   207        A     E    Bal      2B    121
## 5  467       15  192 186   161        N     W     LA       C    304
## 6 1133       19  501 336   194        A     W    Oak      SS    282
##   assist86 error86   sal87 league87 team87
## 1      127       7  70.000        A    Min
## 2       43      10 475.000        N    Hou
## 3      445      22 517.143        A    Det
## 4      151       6 700.000        A    Bal
## 5       45      11 512.500        N     LA
## 6      421      25 750.000        A    Oak
corrgram(Baseball, order=NULL, lower.panel=panel.shade,
  upper.panel=NULL, text.panel=panel.txt)

plot of chunk unnamed-chunk-3