Baseball Data

The Sashelp.Baseball data set contains salary and performance information for Major League Baseball players (excluding pitchers) who played at least one game in both the 1986 and 1987 seasons. The salaries are for the 1987 season, and the performance measures are from the 1986 season. The following steps display information about the Sashelp.Baseball data set and create Figure B.1:

title 'Baseball Data';
proc contents data=sashelp.Baseball varnum;
   ods select position;
run;

title 'The First Five Observations Out of 322';
proc print data=sashelp.Baseball(obs=5);
run;

Figure B.1: Baseball Data

Baseball Data

Variables in Creation Order
# Variable Type Len Label
1 Name Char 18 Player's Name
2 Team Char 14 Team at the End of 1986
3 nAtBat Num 8 Times at Bat in 1986
4 nHits Num 8 Hits in 1986
5 nHome Num 8 Home Runs in 1986
6 nRuns Num 8 Runs in 1986
7 nRBI Num 8 RBIs in 1986
8 nBB Num 8 Walks in 1986
9 YrMajor Num 8 Years in the Major Leagues
10 CrAtBat Num 8 Career Times at Bat
11 CrHits Num 8 Career Hits
12 CrHome Num 8 Career Home Runs
13 CrRuns Num 8 Career Runs
14 CrRbi Num 8 Career RBIs
15 CrBB Num 8 Career Walks
16 League Char 8 League at the End of 1986
17 Division Char 8 Division at the End of 1986
18 Position Char 8 Position(s) in 1986
19 nOuts Num 8 Put Outs in 1986
20 nAssts Num 8 Assists in 1986
21 nError Num 8 Errors in 1986
22 Salary Num 8 1987 Salary in $ Thousands
23 Div Char 16 League and Division
24 logSalary Num 8 Log Salary

The First Five Observations Out of 322

Obs Name Team nAtBat nHits nHome nRuns nRBI nBB YrMajor CrAtBat CrHits CrHome CrRuns CrRbi CrBB League Division Position nOuts nAssts nError Salary Div logSalary
1 Allanson, Andy Cleveland 293 66 1 30 29 14 1 293 66 1 30 29 14 American East C 446 33 20 . AE .
2 Ashby, Alan Houston 315 81 7 24 38 39 14 3449 835 69 321 414 375 National West C 632 43 10 475.0 NW 6.16331
3 Davis, Alan Seattle 479 130 18 66 72 76 3 1624 457 63 224 266 263 American West 1B 880 82 14 480.0 AW 6.17379
4 Dawson, Andre Montreal 496 141 20 65 78 37 11 5628 1575 225 828 838 354 National East RF 200 11 3 500.0 NE 6.21461
5 Galarraga, Andres Montreal 321 87 10 39 42 30 2 396 101 12 48 46 33 National East 1B 805 40 4 91.5 NE 4.51634