Learn R Programming

Sabermetrics (version 1.0)

fip: Field Independent Pitching

Description

Similar to DICE dice

Usage

fip(HR, BB, K, IP, C)

Arguments

HR
Home Runs allowed
BB
Walks
K
Strikeouts
IP
Innings Pitched
C
League average ERA

Value

  • Returns ((13*HR+3*BB-2*K)/IP) + C

References

http://en.wikipedia.org/wiki/Defense_independent_pitching_statistics

See Also

DICE dice

Examples

Run this code
## Field Independent Pitching (fip) function is currently defined as
function (HR, BB, K, IP, C) 
{
    fieldIndPitch <- ((13 * HR + 3 * BB - 2 * K)/IP) + C
    return(fieldIndPitch)
  }
  
## Let's take 2014's MLB MVP, Clayton Kershaw, and find his FIPS
## Stats for Clayton Kershaw available on
## http://www.baseball-reference.com/players/k/kershcl01-pitch.shtml
## For 2014, Kershaw allowed 9 HR, 31 BB, 239 K, 198.1 IP and league era (C) of 3.66
## The formula for his FIPS using the dice function is below
## Output should be 2.307148
fip(9,31,239,198.1,3.66)

Run the code above in your browser using DataLab