The baseballDBR package provides two functions for fielding independent pitching (FIP), the FIP() function, which calculates the metric for players in the "Pitching" table, and the fip_values() function, which calculates the league averages and constraints used in the calculation.

The FIP metric attempts to estimate a pitcher's performance independent of the performance of the other players on the defense. The goal is similar to that of earned run average (ERA), but unlike ERA, FIP removes the variable of a pitcher's "luck" from plays made by other defenders.

Like wOBA, FIP is a weighted metric that relies on a system of linear weights and league averages. The formula for FIP is:

$$\frac{13HR + 3(BB + HBP) - 2SO}{IP} + FIP constant$$

The above formula is based off of work by Tom Tango, and is similar to the DIPS metric by Voros McCracken. It looks at only the things a pitching can control such as hit-by-pitch, base-on-ball, strikeouts, and home runs and weights them accordingly.

The FIP Constant

The FIP constant is used in the FIP calculation solely to bring the number onto the ERA scale, and make it more familiar to users. The wOBA constant works in much the same way to bring wOBA closer to OBP. The formula for the FIP constant is:

$$\frac{lgERA - (HR13) + (BB + IBB + HBP - IBB)3 - (SO2)}{IP}$$

library(baseballDBR)

# Grab the Pitching table from the Baseabll Databank
get_bbdb(table = "Pitching")

Pitching$FIP <- FIP(Pitching, Fangraphs=FALSE, NA_to_zero=FALSE, Sep.Leagues=FALSE)

Arguments

Unlike the wOBA() functions, which require three data frames, the FIP() function only requires the "Pitching" data frame.

Fip Values

For deeper analysis, the fip_values() function allows us to look at the league averages that are the underpinnings of the FIP calculation.

library(baseballDBR)

fip_valz <- fip_values(Pitching, Fangraphs = FALSE, Sep.Leagues = FALSE)


keberwein/baseballDBR documentation built on May 20, 2019, 8:29 a.m.