Research Questions

  • Do certain positions in baseball have a higher correlation to errors?
  • Are there factors that determine if a player will play 80 or more games per season?
  • Does a player having more Gold Gloves and All-Star game appearances put them in special company in the Baseball Hall of Fame?
  • Using logistic regression, principal component analysis, and K-Means clustering, the data reveals the correlations and findings behind each question.

The Lahman Dataset

  • Data goes back as far as 1871 and is kept up to date every season
  • Built-in foreign keys link to other baseball data sources (Retro ID for Retrosheet, bbrefID for Baseball Reference)
  • Tables used: Fielding, Batting, People, HallOfFame, AwardsPlayers, AllstarFull

Error Analysis and the Inspiration

  • Herman Long – 1,096 career errors, vs. Cal Ripken Jr. – 225
  • Data set to 1999-2018, the modern era
  • Goal: create an Error Indicator to help predict if a player is more error-prone than his peers at the same position

Building the Indicator

Average errors by position across the 1999-2018 window:

Building the Error Indicator

A player is flagged ErrorInd = 1 when their errors exceed the rounded-up average for their position:

myDataClean$ErrorInd <- ifelse(
  myDataClean$POS == 1 & myDataClean$E > 1 |
  myDataClean$POS == 2 & myDataClean$E > 3 |
  myDataClean$POS == 5 & myDataClean$E > 4 |
  myDataClean$POS == 3 & myDataClean$E > 2 |
  myDataClean$POS == 4 & myDataClean$E > 3 |
  myDataClean$POS == 6 & myDataClean$E > 5 |
  myDataClean$POS == 7 & myDataClean$E > 1,
  1, 0
)

Logistic Regression Results

term estimate std.error statistic p.value
(Intercept) 42.7490 7.2422 5.9027 0.0000
POS 0.0539 0.0086 6.2563 0.0000
G 0.0381 0.0007 57.6948 0.0000
A 0.0115 0.0007 15.6110 0.0000
DP 0.0049 0.0021 2.3467 0.0189
lgIDNL -0.0301 0.0417 -0.7213 0.4708
yearID -0.0230 0.0036 -6.3799 0.0000
  • Position, games played, and assists are the clear standouts in this model
  • 70/30 training/testing split
  • Null-deviance chi-squared test: 1 - pchisq(26528, 25286) ≈ 2.7e-08 – far below 0.05

What Makes a Workhorse?

  • Same 1999-2018 timeframe as the errors analysis
  • Pitchers excluded this time – their “games played” doesn’t mean the same thing as an everyday position player
  • Question: using PCA, are there factors (or combinations of factors) that predict a workhorse-level number of games played?

How Did 80 Games Become the Threshold?

  • Average games played per season, across all position players: ~41 games
  • That felt too low relative to expectations – roughly doubling it gives a round number: 80
  • A player who appears in more than 80 games in a season is flagged as a workhorse (WH = 1)

Games Played by Workhorses, by Position

PCA Analysis

  • Combined fielding, batting, and player-age information
  • Modeled around each player’s primary position
  • 80/20 training/testing split
  • Factors: yearID, POS, age, G, A, E, DP, H, R, RBI, BB, SO

Another Look at Workhorse Factors

Offensive metrics – runs, hits, and RBIs – carry the most weight for predicting workhorse status.

Hall of Fame: All-Star Games and Gold Gloves

No Babe?

  • Only players active in 1957 or later are eligible for this analysis (the first Gold Glove wasn’t awarded until 1957)
  • 131 Hall of Famers were excluded from this analysis; 99 (now more, with newer inductees) remained

K-Means Clustering

  • Dependent “label”: player’s name
  • Independent variables: number of All-Star appearances, number of Gold Gloves awarded
  • 3 clusters requested from the model

K-Means: Hall of Famers

Hierarchical Clustering

A Cluster of His Own

  • Greg Maddux sets himself apart in this model
  • The most Gold Gloves awarded to any player, plus 8 All-Star game appearances
  • A group of just one, among some of baseball’s greats

Questions and Discussion