Capstone Project – Baseball Analysis of the Lahman Dataset

Tom Matthews

← Back to the full written analysis

Research Questions

The Lahman Dataset

Error Analysis and the Inspiration

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

What Makes a Workhorse?

How Did 80 Games Become the Threshold?

Games Played by Workhorses, by Position

PCA Analysis

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?

K-Means Clustering

K-Means: Hall of Famers

Hierarchical Clustering

A Cluster of His Own

Questions and Discussion