Help with calculating WARP (from basketball-prospectus)

Home for all your discussion of basketball statistical analysis.
Post Reply
AcrossTheCourt
Posts: 237
Joined: Sat Feb 16, 2013 11:56 am

Help with calculating WARP (from basketball-prospectus)

Post by AcrossTheCourt » Sun Jul 28, 2013 3:45 am

I recently tried to calculate WARP because I wanted to compare it to other metrics in predicting team wins in the 2013 (and because I think it's an interesting metric with what it does with usage and spacing.)

Online guide to calculating it.

The defensive component is mostly correct according to this sample of Miami players.

But I'm completely wrong on the offensive side. I think it's this step:
Teammate eFG% = ((TeammateOffRat/100) - (LgFT/LgPoss)) / TeammateFGA

Is that TeammateFGA% or total TeammateFGA's? The teammate eFG% should be around .45ish, I assume.

And I assume PlayerRebOpp% = (FGA - FGM) + .56*(FTA - FTM) / (FGA + (.44*FTA) + TO) is actually:
PlayerRebOpp% = ( (FGA - FGM) + .56*(FTA - FTM) ) / (FGA + (.44*FTA) + TO)

Here's a sample calculation line for LeBron James:

EDIT: I updated the numbers because I think I fixed a couple things.

Code: Select all

  PC   	Pos     OffRat  Usage  TmOffRatMinor	TmOReb%	PlayerRebOpp%	TmteOffRat
1799.3	1661.005	108.3	0.331	   99.5	     0.255	    0.431	     107.0

Code: Select all

TmteFGA% Tmte eFG% TmteFG% TmteRebOpp% TmRebOpp% TmOffRat  3A%	Tm3A%	TmOffRat3
 0.770    0.511	  0.470	   0.392	  0.402   	109.4   0.09   0.15  	113.6
LeBron's actual Offensive Rating: 115.6. I'm closer on LeBron's rating than the others. This seems to be more with big guys. I calculated Joel Anthony as 108.3 instead of 102.9, for example,

Notes:
-TmOffRatMinor: the usage component was not in terms of 100 possessions, so I changed .25 to 25 in the formula:
TmOffRatMinor = OffRat*Pos% + ((1-Pos%)*(LgOffRat + (.25*(Pos% - 0.2))))
-The formula for TmOReb% seems off because you're adding the league average and the player's OReb%, so I multiplied the team factor by 4/5.
-PlayerRebOpp%: in the formula, are those individual or team totals (FT, FTA, etc)?
-Multiplied the usage factor by 100 so it's in terms of 100 possessions for this formula:
TeammateOffRat = LgOffRat + (.25*(Pos% - 0.2))
-I didn't understand what was in the Teammate eFG% denominator, so I tweaked the formula and got results close to the league average for eFG%.
Teammate eFG% = ((TeammateOffRat/100) - (LgFT/LgPoss)*.56/2) / 2
(That's probably wrong....)

Can anyone help? Thanks.
Last edited by AcrossTheCourt on Wed Jul 31, 2013 2:57 am, edited 2 times in total.

nbacouchside
Posts: 114
Joined: Sun Jul 14, 2013 4:58 am
Contact:

Re: Help with calculating WARP (from basketball-prospectus)

Post by nbacouchside » Sun Jul 28, 2013 4:19 am

I was actually doing much the same exercise with the Bulls (mostly out of my own curiosity) and came up with the same frustrations. Also, Kevin often switches between using "Usage" as a term and then other times uses "Pos %" or "Poss %" and it's all very confusing.

The question I had (which I just tweeted at him) was how he calculates LgPoss in doing the calculations regarding Teammate FGA%, eFG%, etc. I'm not even coming close to getting accurate readings and yes, I also had the same Q re: whether it is supposed to be Teammate FGA% or Teammate FGA (and if it's the latter, how to calculate it).

nbacouchside
Posts: 114
Joined: Sun Jul 14, 2013 4:58 am
Contact:

Re: Help with calculating WARP (from basketball-prospectus)

Post by nbacouchside » Mon Jul 29, 2013 3:54 am

All these views and no one else has tried to do this either?

Too bad Kevin's not around to chime in.

Mike G
Posts: 4429
Joined: Fri Apr 15, 2011 12:02 am
Location: Asheville, NC

Re: Help with calculating WARP (from basketball-prospectus)

Post by Mike G » Mon Jul 29, 2013 1:32 pm

I don't know that this WARP has ever been debated here.
As such, it may be that nobody here is really familiar with it at all.

It would be excellent if another Wins-attributing system were available for use, or at least for comparison to others. But I think open discussion is always essential to the final product. Every system has its quirks, and no creator of such a system will see every angle.

I'd always thought WARP was a generic term for such systems. If you changed it, you could call it WORP ("over" instead of "above"), if you don't want to encroach on someone's name.

v-zero
Posts: 409
Joined: Sat Oct 27, 2012 12:30 pm

Re: Help with calculating WARP (from basketball-prospectus)

Post by v-zero » Mon Jul 29, 2013 5:18 pm

Any metric on the +/- scale (e.g. RAPM) or a similar per-minute scale can be trivially converted to wins.

nbacouchside
Posts: 114
Joined: Sun Jul 14, 2013 4:58 am
Contact:

Re: Help with calculating WARP (from basketball-prospectus)

Post by nbacouchside » Mon Jul 29, 2013 6:08 pm

v-zero wrote:Any metric on the +/- scale (e.g. RAPM) or a similar per-minute scale can be trivially converted to wins.
Right. I wasn't trying to get Pelton's WARP for any reason other than to see what it had to say about certain players. I'm generally curious about these different statistics in general. So I wanted to try to calculate his WARP for the different teams that I'm most interested in, but I couldn't follow his calculations and I got tripped up in basically the same spots as AcrossTheCourt. Maybe I will just e-mail Kevin directly and ask him about this stuff.

AcrossTheCourt
Posts: 237
Joined: Sat Feb 16, 2013 11:56 am

Re: Help with calculating WARP (from basketball-prospectus)

Post by AcrossTheCourt » Tue Jul 30, 2013 10:00 pm

Perhaps someone here could contact Pelton for some clarifications?

Kevin Pelton
Site Admin
Posts: 102
Joined: Thu Apr 14, 2011 10:05 pm

Re: Help with calculating WARP (from basketball-prospectus)

Post by Kevin Pelton » Wed Jul 31, 2013 3:34 am

Hey guys, I can take a look at your calculations and compare them to mine next week if you hold tight. This week is not good for me.

AcrossTheCourt
Posts: 237
Joined: Sat Feb 16, 2013 11:56 am

Re: Help with calculating WARP (from basketball-prospectus)

Post by AcrossTheCourt » Wed Jul 31, 2013 3:56 am

Thanks. Good luck with wrangling the crazy off-season for ESPN.

AcrossTheCourt
Posts: 237
Joined: Sat Feb 16, 2013 11:56 am

Re: Help with calculating WARP (from basketball-prospectus)

Post by AcrossTheCourt » Thu Aug 08, 2013 2:57 am

Kevin Pelton wrote:Hey guys, I can take a look at your calculations and compare them to mine next week if you hold tight. This week is not good for me.
Alright do you have any time now?

Kevin Pelton
Site Admin
Posts: 102
Joined: Thu Apr 14, 2011 10:05 pm

Re: Help with calculating WARP (from basketball-prospectus)

Post by Kevin Pelton » Fri Aug 09, 2013 1:28 am

In the sample calculations, are those for 2010-11 or another season? Assuming it's 2010-11, they're generally similar but not quite the same to what I have:

Code: Select all

Points1000  TO1000   FGA1000   FG%   TmmteRebPs   PlRebPs   TmRebPs
   975       121       778    0.472    0.441       0.396     0.426
As you can see, the teammate stats are all expressed per 1000 plays in my spreadsheet to make them a little easier to understand -- that's part of what I'm losing in translation to explaining online.

You are correct that when we're doing these all as percentages, it should be FGA% and not FG%.

League Possessions should just be FGA + .44*FTA + TO for the entire league.

AcrossTheCourt
Posts: 237
Joined: Sat Feb 16, 2013 11:56 am

Re: Help with calculating WARP (from basketball-prospectus)

Post by AcrossTheCourt » Fri Aug 09, 2013 3:34 am

Kevin Pelton wrote:In the sample calculations, are those for 2010-11 or another season? Assuming it's 2010-11, they're generally similar but not quite the same to what I have:

Code: Select all

Points1000  TO1000   FGA1000   FG%   TmmteRebPs   PlRebPs   TmRebPs
   975       121       778    0.472    0.441       0.396     0.426
As you can see, the teammate stats are all expressed per 1000 plays in my spreadsheet to make them a little easier to understand -- that's part of what I'm losing in translation to explaining online.

You are correct that when we're doing these all as percentages, it should be FGA% and not FG%.

League Possessions should just be FGA + .44*FTA + TO for the entire league.
Oh no it's the 2012 season. I found a guide to the 2013 Miami Heat. It lists every player's WARP in the previous season. In 2012, for example, it listed LeBron with an oRTG of 115.6 and a dRTG of 104.3.

Kevin Pelton
Site Admin
Posts: 102
Joined: Thu Apr 14, 2011 10:05 pm

Re: Help with calculating WARP (from basketball-prospectus)

Post by Kevin Pelton » Fri Aug 09, 2013 6:32 am

In that case our numbers are actually less close. Here is what I have:

Code: Select all

Points1000  TO1000   FGA1000   FG%   TmmteRebPs   PlRebPs   TmRebPs
  946        124       782    0.462    0.451       0.382     0.428
One big possible discrepancy: Are you including non-player team turnovers?

AcrossTheCourt
Posts: 237
Joined: Sat Feb 16, 2013 11:56 am

Re: Help with calculating WARP (from basketball-prospectus)

Post by AcrossTheCourt » Fri Aug 09, 2013 8:33 am

I don't think I am. I checked the calculations and I don't think they are in there. That was one question I had. Should team TOVs be used anywhere and if so, where?

Kevin Pelton
Site Admin
Posts: 102
Joined: Thu Apr 14, 2011 10:05 pm

Re: Help with calculating WARP (from basketball-prospectus)

Post by Kevin Pelton » Fri Aug 09, 2013 3:32 pm

Nope. That would be the right way to do it. Do you want to maybe send me your spreadsheet and I can compare?

Post Reply