Help with calculating WARP (from basketball-prospectus)
Re: Help with calculating WARP (from basketball-prospectus)
Thanks Kevin. As a quick aside, really love all the work you do on ESPN - it's between you and Zach Lowe for my vote for favorite NBA writer. Really love the analytical approach you take and the way you look at things. Looking forward to a number of trade value columns in the near future.
Before I jump into the defensive numbers, let me put out the various numbers I came up with for Battier on offense, since that seems to be the biggest discrepancy (and since he shoots so many three pointers, gets the most value out of the floor spacing). It could be an issue of me using the wrong "usage" - I believe I made sure to use Player TO's rather than Team TO's but perhaps I missed one of those as well.
Also real quickly, on the offensive side, are you using Actual Assisted FG numbers or the estimated calculation from your website?
PC: 296.869
AFGm: 100.842 (per 82 games he was assisted on 85% of his FGM or 96.05, so a little off there)
Pos: 338.214
Usage(KP): .1051
"Simple" Usage: .1073
OffRatMinor (player): 87.775
LeagueOffRatMinor: 91.450
LeagueOffRatMajor: 102.5246
TmOffRatMinor: 88.987
TmOReb%: .2638
PlayerRebOpp%: .5411
TeammateOffRat: 89.078
Teammate FGA%: .7674
Teammate eFG%: .4757
Teammate FG%: .4373
TeammateRebOpp%: .4614
TmRebOpp%: .4700
RebFactor1: .8775
RebFactor2: 1.1211
TmOffRat: 101.18
TmOffRat3: 108.18
If you could let me know where we diverge, I can dig in and see where I went wrong. Thanks for the help!
Before I jump into the defensive numbers, let me put out the various numbers I came up with for Battier on offense, since that seems to be the biggest discrepancy (and since he shoots so many three pointers, gets the most value out of the floor spacing). It could be an issue of me using the wrong "usage" - I believe I made sure to use Player TO's rather than Team TO's but perhaps I missed one of those as well.
Also real quickly, on the offensive side, are you using Actual Assisted FG numbers or the estimated calculation from your website?
PC: 296.869
AFGm: 100.842 (per 82 games he was assisted on 85% of his FGM or 96.05, so a little off there)
Pos: 338.214
Usage(KP): .1051
"Simple" Usage: .1073
OffRatMinor (player): 87.775
LeagueOffRatMinor: 91.450
LeagueOffRatMajor: 102.5246
TmOffRatMinor: 88.987
TmOReb%: .2638
PlayerRebOpp%: .5411
TeammateOffRat: 89.078
Teammate FGA%: .7674
Teammate eFG%: .4757
Teammate FG%: .4373
TeammateRebOpp%: .4614
TmRebOpp%: .4700
RebFactor1: .8775
RebFactor2: 1.1211
TmOffRat: 101.18
TmOffRat3: 108.18
If you could let me know where we diverge, I can dig in and see where I went wrong. Thanks for the help!
Re: Help with calculating WARP (from basketball-prospectus)
Ok so diving into the defensive side:
Starting with defensive possessions, I did use Opponent TEAM Turnovers in my calculation. Should that be Opponent INDIVIDUAL Turnovers? Although I'm not sure how you would go about easily getting that data without combing through box scores.
My calculation for LeBron in 2011-12 was 5,086.4 defensive possessions. On the offensive side, if I take the Adjusted Possessions used, i.e. your adjustment for assists and assisted FG (1670.8) / the adjusted Usage figure of .335 I get 4,992.87 possessions. The difference would seem to be attributable to Team Turnovers.
The other formula that could have the same issue is TmFTOPos which requires an input of OpponentPos. In that instance I used TEAM Turnovers for the Opponent not INDIVIDUAL. In all other instances (TEAM and LEAGUE) I used INDIVIDUAL Turnovers.
Moving past that, you noted we were reasonable close through DefRatingMinor, but I needed a much bigger jump to DefRatingMajor.
Here is my calculation for LeBron in 2011-12 (using the figures for TmDefRatMinor, TmDReb%, OppRebOpp%, RebFactor1 and RebFactor2 from my previous posts):
TmDefRat (Major): = (89.11+((1-.746)*.522*.88*1.12))/.96 = 89.11+ .13 (assuming this should be multiplied by 100, which I didn't do before), therefore 89.11 + 13 = 102.11/.96 = 106.37
At the very least this number is considerably higher, but now appears too high, so perhaps one of the inputs is off slightly.
Starting with defensive possessions, I did use Opponent TEAM Turnovers in my calculation. Should that be Opponent INDIVIDUAL Turnovers? Although I'm not sure how you would go about easily getting that data without combing through box scores.
My calculation for LeBron in 2011-12 was 5,086.4 defensive possessions. On the offensive side, if I take the Adjusted Possessions used, i.e. your adjustment for assists and assisted FG (1670.8) / the adjusted Usage figure of .335 I get 4,992.87 possessions. The difference would seem to be attributable to Team Turnovers.
The other formula that could have the same issue is TmFTOPos which requires an input of OpponentPos. In that instance I used TEAM Turnovers for the Opponent not INDIVIDUAL. In all other instances (TEAM and LEAGUE) I used INDIVIDUAL Turnovers.
Moving past that, you noted we were reasonable close through DefRatingMinor, but I needed a much bigger jump to DefRatingMajor.
Here is my calculation for LeBron in 2011-12 (using the figures for TmDefRatMinor, TmDReb%, OppRebOpp%, RebFactor1 and RebFactor2 from my previous posts):
TmDefRat (Major): = (89.11+((1-.746)*.522*.88*1.12))/.96 = 89.11+ .13 (assuming this should be multiplied by 100, which I didn't do before), therefore 89.11 + 13 = 102.11/.96 = 106.37
At the very least this number is considerably higher, but now appears too high, so perhaps one of the inputs is off slightly.
-
- Posts: 237
- Joined: Sat Feb 16, 2013 11:56 am
Re: Help with calculating WARP (from basketball-prospectus)
I'll check those calculations soon. I got busy with play-by-play data during this topic and didn't calculate defensive WARP. I do want to figure out the calculations for both WARP and Wins Produced soon though.
If someone talks to Kevin regularly, try to "page" him because I'm sure he's still in a post-Super Bowl daze.
If someone talks to Kevin regularly, try to "page" him because I'm sure he's still in a post-Super Bowl daze.
Re: Help with calculating WARP (from basketball-prospectus)
Kevin actually replied on Tuesday which surprised me. We'll see if he's able to help with my other questions.
Let me know what numbers you come up with on the defensive side.
Also, if you want to post your various inputs on Battier's offensive calculation, we can see where you and I differ (which also then differs from Kevin).
Let me know what numbers you come up with on the defensive side.
Also, if you want to post your various inputs on Battier's offensive calculation, we can see where you and I differ (which also then differs from Kevin).
-
- Posts: 237
- Joined: Sat Feb 16, 2013 11:56 am
Re: Help with calculating WARP (from basketball-prospectus)
Here's what I have so far with defensive WARP:
Pos
5086.4
TmBSPos
0.129
LgFTARate
0.507
TmFTAPos
0.0847
TDF
0.145
Tm FTOPos
0.0516
TmFGRat
1.038
TmDefRatMinor
90.7
TmDReb%
0.784
OppFG%
0.477
OppReb Opp%
0.553
TmDefRat
109.3
Where are the discrepancies?
Pos
5086.4
TmBSPos
0.129
LgFTARate
0.507
TmFTAPos
0.0847
TDF
0.145
Tm FTOPos
0.0516
TmFGRat
1.038
TmDefRatMinor
90.7
TmDReb%
0.784
OppFG%
0.477
OppReb Opp%
0.553
TmDefRat
109.3
Where are the discrepancies?
Re: Help with calculating WARP (from basketball-prospectus)
See below for what I came up with. Many of these build on previous formulas. I haven't looked at my calculations in a while, so I'll check and see if I can figure out where we start diverging and why.
Pos - SAME
5086.4
TmBSPos
0.129 (0.12950 - ROUGHLY SAME?)
LgFTARate
0.507 (.50505 - MINOR DIFFERENCE)
TmFTAPos
0.0847 (0.08464 - ROUGHLY SAME? - LgFTARate will impact)
TDF - SAME
0.145
Tm FTOPos
0.0516 (0.0668 - OFF QUITE A BIT HERE - I came up with TmOppPos of 7,015.08)
TmFGRat - SAME
1.038
TmDefRatMinor
90.7 (89.11)
TmDReb%
0.784 (.746)
OppFG% - SAME
0.477
OppReb Opp%
0.553 (0.522)
TmDefRat
109.3 (106.37)
Pos - SAME
5086.4
TmBSPos
0.129 (0.12950 - ROUGHLY SAME?)
LgFTARate
0.507 (.50505 - MINOR DIFFERENCE)
TmFTAPos
0.0847 (0.08464 - ROUGHLY SAME? - LgFTARate will impact)
TDF - SAME
0.145
Tm FTOPos
0.0516 (0.0668 - OFF QUITE A BIT HERE - I came up with TmOppPos of 7,015.08)
TmFGRat - SAME
1.038
TmDefRatMinor
90.7 (89.11)
TmDReb%
0.784 (.746)
OppFG% - SAME
0.477
OppReb Opp%
0.553 (0.522)
TmDefRat
109.3 (106.37)
Re: Help with calculating WARP (from basketball-prospectus)
Here's the first few discrepancies and my calculation. Let's start there and let me know your calculations or if you agree with mine:
LgFTARate: (.44 x Lg FTA of 44,472)/Lg PF of 38,744
TmFTOPos: (TDF of .145*((OppTOV of 1,107 - TmSTL of 585)/TmOppPos of 7,015.08))+((1-TDF of .145)*((LgTOV of 28,860 - LgSTL of 15,200)/League Pos of 208,413))
As far as a couple of the inputs, I calculated as follows:
TmOppPos: OppFGA of 5,267 + (.44*OppFTA of 1,457) + OppTOV of 1,107
LeaguePos: LgFGA of 161,225 + (.44*LgFTA of 44,472) + Lg(Player, not Team)TO of 27,620
LgFTARate: (.44 x Lg FTA of 44,472)/Lg PF of 38,744
TmFTOPos: (TDF of .145*((OppTOV of 1,107 - TmSTL of 585)/TmOppPos of 7,015.08))+((1-TDF of .145)*((LgTOV of 28,860 - LgSTL of 15,200)/League Pos of 208,413))
As far as a couple of the inputs, I calculated as follows:
TmOppPos: OppFGA of 5,267 + (.44*OppFTA of 1,457) + OppTOV of 1,107
LeaguePos: LgFGA of 161,225 + (.44*LgFTA of 44,472) + Lg(Player, not Team)TO of 27,620
-
- Posts: 237
- Joined: Sat Feb 16, 2013 11:56 am
Re: Help with calculating WARP (from basketball-prospectus)
Okay I fixed the errors. I wasn't using the right totals in some places (I summed individual players instead of team totals), I had the wrong team DReb% used in the final DRtg calculation, and I copied the wrong steal total. Anyway, now things are really close:
TeamPos
7015.08
Pos
5086.4
TmBSPos
0.1289
LgFTARate
0.5051
TmFTAPos
0.08420
=0.5051*96/5086.4+0.8*0.44*44472/209652.68
(The discrepancy is from league possessions maybe?)
TDF
0.145
Tm FTOPos
0.06650
TmFGRat
1.038
TmDefRatMinor
89.17
TmDReb%
0.7465
OppFG%
0.4770
OppReb Opp%
0.5456
TmDefRat
107.05
TeamPos
7015.08
Pos
5086.4
TmBSPos
0.1289
LgFTARate
0.5051
TmFTAPos
0.08420
=0.5051*96/5086.4+0.8*0.44*44472/209652.68
(The discrepancy is from league possessions maybe?)
TDF
0.145
Tm FTOPos
0.06650
TmFGRat
1.038
TmDefRatMinor
89.17
TmDReb%
0.7465
OppFG%
0.4770
OppReb Opp%
0.5456
TmDefRat
107.05
Re: Help with calculating WARP (from basketball-prospectus)
TeamPos - SAME
7015.08
Pos - SAME
5086.4
TmBSPos - I HAVE 0.1295
0.1289
LgFTARate - SAME
0.5051
TmFTAPos - I HAVE 0.08464 - DIFFERENCE IS DUE TO LEAGUE POSSESSIONS - I HAVE 208,413 - LET ME KNOW HOW YOU CALCULATED YOUR NUMBER
0.08420
=0.5051*96/5086.4+0.8*0.44*44472/209652.68
(The discrepancy is from league possessions maybe?)
TDF - SAME
0.145
Tm FTOPos - SLIGHTLY OFF DUE TO LEAGUE POSSESSIONS NUMBER
0.06650
TmFGRat - SAME
1.038
TmDefRatMinor - 89.11 - OFF DUE TO MINOR ITEMS ABOVE
89.17
TmDReb% - SAME
0.7465
OppFG% - SAME
0.4770
OppReb Opp% - OFF QUITE A BIT HERE - I HAVE 0.5215 - COULD BE DUE TO ITEMS ABOVE
0.5456
TmDefRat - CLOSER TO MINE OF 106.37 (WHICH I'M NOT ENTIRELY CONFIDENT IS CORRECT ANYWAYS)
107.05
7015.08
Pos - SAME
5086.4
TmBSPos - I HAVE 0.1295
0.1289
LgFTARate - SAME
0.5051
TmFTAPos - I HAVE 0.08464 - DIFFERENCE IS DUE TO LEAGUE POSSESSIONS - I HAVE 208,413 - LET ME KNOW HOW YOU CALCULATED YOUR NUMBER
0.08420
=0.5051*96/5086.4+0.8*0.44*44472/209652.68
(The discrepancy is from league possessions maybe?)
TDF - SAME
0.145
Tm FTOPos - SLIGHTLY OFF DUE TO LEAGUE POSSESSIONS NUMBER
0.06650
TmFGRat - SAME
1.038
TmDefRatMinor - 89.11 - OFF DUE TO MINOR ITEMS ABOVE
89.17
TmDReb% - SAME
0.7465
OppFG% - SAME
0.4770
OppReb Opp% - OFF QUITE A BIT HERE - I HAVE 0.5215 - COULD BE DUE TO ITEMS ABOVE
0.5456
TmDefRat - CLOSER TO MINE OF 106.37 (WHICH I'M NOT ENTIRELY CONFIDENT IS CORRECT ANYWAYS)
107.05
-
- Posts: 237
- Joined: Sat Feb 16, 2013 11:56 am
Re: Help with calculating WARP (from basketball-prospectus)
=(50+115)/5086.4+0.8*(10086+15200)/209652.7TmBSPos - I HAVE 0.1295
0.1289
=161225+0.44*44472+28860TmFTAPos - I HAVE 0.08464 - DIFFERENCE IS DUE TO LEAGUE POSSESSIONS - I HAVE 208,413 - LET ME KNOW HOW YOU CALCULATED YOUR NUMBER
0.08420
=0.5051*96/5086.4+0.8*0.44*44472/209652.68
(The discrepancy is from league possessions maybe?)
I guess I was using the wrong TmBlk percentage. I used blocks out of two point field goal attempts, not all. It's now at 0.5226.OppReb Opp% - OFF QUITE A BIT HERE - I HAVE 0.5215 - COULD BE DUE TO ITEMS ABOVE
0.5456
And now:
TmDefRat
106.45
Is Kevin Pelton going to respond to these? The reference I'm using has his DRtg at 104.3.
-
- Posts: 237
- Joined: Sat Feb 16, 2013 11:56 am
Re: Help with calculating WARP (from basketball-prospectus)
I found team opponent individual turnovers. Sum them from b-ref's gamelogs. Total: 1043, as opposed to 1107.
It looks like the problem is with OppReb Opp%. .52 is too high, comparing it to the offensive version of Reb Opp%. In the equation, there's TmBlk% + Blk/Pos + .8*LgBlk/LgPos. I think TmBlk% is redundant. Without that term, it drops to 0.4573. And now DRtg is 105.36.
Oh and my final Ortg is now 114.5 (double-checked my raw data and fixed an error.)
It looks like the problem is with OppReb Opp%. .52 is too high, comparing it to the offensive version of Reb Opp%. In the equation, there's TmBlk% + Blk/Pos + .8*LgBlk/LgPos. I think TmBlk% is redundant. Without that term, it drops to 0.4573. And now DRtg is 105.36.
Oh and my final Ortg is now 114.5 (double-checked my raw data and fixed an error.)
Re: Help with calculating WARP (from basketball-prospectus)
Hopefully Kevin can respond once the trade deadline settles down. Or if the current pace continues, he won't have much work to do.
Our first discrepancy was LgPOS - I was using Player Turnovers, not Team Turnovers. It would seem to make more sense to use Team Turnovers in this instance as you did, so I changed my formula and got your number of 209,653.
In re: to Tm Blk Percentage, did you conclude to use all FGA or just 2FGAs? I originally had all, sounded like you just had 2FGAs but then switched to all? But then maybe that item is redundant as you note?
Either way, after adjusting my LgPOS number, I got the same numbers as you until OppRebOpp%, which I have 0.5192. Fairly close to yours, we can dig in after determining whether it is even the right formula to begin with. Only a minor impact on TmDefRat, which I come up with 106.36.
But as you note, that is too high. What do you have for Kevin's ORtg? I came up with 114.12 - close to yours of 114.5 but obviously we have something different along the way.
Our first discrepancy was LgPOS - I was using Player Turnovers, not Team Turnovers. It would seem to make more sense to use Team Turnovers in this instance as you did, so I changed my formula and got your number of 209,653.
In re: to Tm Blk Percentage, did you conclude to use all FGA or just 2FGAs? I originally had all, sounded like you just had 2FGAs but then switched to all? But then maybe that item is redundant as you note?
Either way, after adjusting my LgPOS number, I got the same numbers as you until OppRebOpp%, which I have 0.5192. Fairly close to yours, we can dig in after determining whether it is even the right formula to begin with. Only a minor impact on TmDefRat, which I come up with 106.36.
But as you note, that is too high. What do you have for Kevin's ORtg? I came up with 114.12 - close to yours of 114.5 but obviously we have something different along the way.
Re: Help with calculating WARP (from basketball-prospectus)
With regards to Opponent Individual (Player) turnovers, did you use that in any of your formulas?
-
- Site Admin
- Posts: 104
- Joined: Thu Apr 14, 2011 10:05 pm
Re: Help with calculating WARP (from basketball-prospectus)
No, should always be player turnovers. So I have lower possession totals than you do -- 5,041 for LeBron as opposed to 5,086.jkeen39 wrote:Our first discrepancy was LgPOS - I was using Player Turnovers, not Team Turnovers. It would seem to make more sense to use Team Turnovers in this instance as you did, so I changed my formula and got your number of 209,653.
The other thing that stands out ... not sure if it's labeling, but I'm pretty sure .477 is opponent *e*FG%, not FG%.
-
- Posts: 237
- Joined: Sat Feb 16, 2013 11:56 am
Re: Help with calculating WARP (from basketball-prospectus)
I'm using only player turnovers now.
I have a question on this component:
OppRebOpp% = (1 - OppFG%)*(1 - TmFTAPos - TmBSPos - TmFTOPos) + .56*((LgFTA - LgFTM)/LgPos) + TmBlk% + Blk/Pos + .8*LgBlk/LgPos
Is TmBlk% needed there? Aren't blocks going to be double-counted if you also have player blocks and lg avg teammate blocks?
That changes the OppRebOpp% to 0.4573. Is that close? Thanks.
I have a question on this component:
OppRebOpp% = (1 - OppFG%)*(1 - TmFTAPos - TmBSPos - TmFTOPos) + .56*((LgFTA - LgFTM)/LgPos) + TmBlk% + Blk/Pos + .8*LgBlk/LgPos
Is TmBlk% needed there? Aren't blocks going to be double-counted if you also have player blocks and lg avg teammate blocks?
That changes the OppRebOpp% to 0.4573. Is that close? Thanks.