Description Usage Arguments Details Value Note Author(s) References See Also Examples
wOBA is a statistic which attempts to credit a batter for each outcome. It is reported as a rate.
1 |
year |
Season to use as context |
AB |
At Bats |
BB |
Unintentional Walks |
IBB |
Intentional Walks |
HBP |
Hit By Pitches |
single |
Singles |
double |
Doubles |
triple |
Triples |
HR |
Home Runs |
SF |
Sacrifice Flies |
The linear weights used for this equation are in the linearWeights dataframe.
Returns a numeric value equal to ((wBB*BB)+(wHBP*HBP)+(w1B*single)+(w2B*double)+(w3B*triple)+(wHR*HR))/(AB+BB-IBB+SF+HBP) where wXX means weight of XX
wOBA is regarded as a better representation of a hitter's skill than batting average or obp.
Peter Xenopoulos
http://www.fangraphs.com/library/offense/woba/
obp,wraa
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ## Let's calculate Mike Trout's 2014 wOBA
## He had 602 AB's, 83 BB's, 6 IBB's, 10 HBP's,
## 89 singles, 39 doubles, 9 triples, 36 homeruns, and 10 sac-flies
## We should get .408 as our output
woba(2014,602,83,6,10,89,39,9,36,10)
## The function is currently defined as
function (year, AB, BB, IBB, HBP, single, double, triple, HR,
SF)
{
wBB <- linearWeights$wBB[which(weights$Season == year)]
wHBP <- linearWeights$wHBP[which(weights$Season == year)]
w1B <- linearWeights$w1B[which(weights$Season == year)]
w2B <- linearWeights$w2B[which(weights$Season == year)]
w3B <- linearWeights$w3B[which(weights$Season == year)]
wHR <- linearWeights$wHR[which(weights$Season == year)]
woba <- ((wBB * BB) + (wHBP * HBP) + (w1B * single) + (w2B *
double) + (w3B * triple) + (wHR * HR))/(AB + BB - IBB +
SF + HBP)
return(woba)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.