Learn R Programming

Sabermetrics (version 2.0)

dice: Defense-Independent Component ERA

Description

DICE represents a way to measure a pitcher's performance on the ERA scale using only events a pitcher can "control"

Usage

dice(hr, bb, hbp, k, ip)

Arguments

hr
Home Runs
bb
Walks
hbp
Hit By Pitches
k
Strikeouts
ip
Innings Pitched

Value

Returns a value equal to (13*hr+3*bb+3*hbp-2*k)/ip + 3.0

Details

DICE uses the typical ERA scale.

References

https://en.wikipedia.org/wiki/Defense-Independent_Component_ERA

See Also

era,fip,xfip,whip

Examples

Run this code

## The function is currently defined as
function (hr, bb, hbp, k, ip) 
{
    dice = (13 * hr + 3 * bb + 3 * hbp - 2 * k)/ip + 3
    return(dice)
  }

Run the code above in your browser using DataLab