Adjusted Defensive Impact Location Methods (including actual code!)

Here are the grisly details about calculating adjusted defensive impact by court location that nobody has been waiting for. I’ve partially explained the methods before here, but some things have changed and that explanation was not comprehensive. So buckle in and get ready for a lot of really dry prose, a couple of kinda cool graphs, and some code that should help you understand the algorithm I’m using to select shots.

Continue reading

How Rashard Lewis Matches Up Against David West

This is a really great article from Miles Wray about Spoelstra’s decision to put Rashard Lewis on David West in game 4 of the Eastern Conference Finals. I want to add a little footnote to it. Miles’ main point is that Rashard Lewis is pretty fast for a 6’10 guy and that allows him not only to play West aggressively, but to help out on other players and then recover quickly and get back to West. This leads to more turnovers.

This turns out to be an interesting case for my Adjusted Defensive Impact visualization too though. The construction of ADI is similar to Adjusted Plus Minus approaches1, but this is a case where APM and its various flavors don’t tell the full story. If you take a look at Jeremias Engelmann’s xRapm stats, you can see that Rashard Lewis is a slight negative on defense. But take a look at his adjusted defensive impact viz:

Rashard Lewis adjusted defensive impact

Lewis isn’t a great defender overall, but he’s a pretty decent defender near the basket. More than that, he’s especially good on the right side close to the basket and in the midrange. Guess who loves those spots? Here’s David West’s season shot chart from

David West shot chart

This is not really the story of last night–West actually shot well when Lewis was in the game (7 for 12) and I think Wray’s assessment is pretty accurate: Lewis was valuable not because he shut down West (who had a good game overall) but because he forced turnovers. But it means that Lewis can do the things he does well, per Wray’s analysis, without being a defensive liability in his matchup with west.

  1. Huge methods post is incoming very soon by the way.

Chris “Birdman” Andersen is a great defender

The Birdman is out for tonight’s Heat v Pacers game and that could make a big difference. Miami has a very strong defensive front court. They start Bosh, who is a very canny defensive player, but there is no drop off when Bosh sits, because Birdman is an excellent defensive center. Check out the numbers from my adjusted defensive impact graph for Andersen. Warm colors (red/orange) indicate that offensive players shoot better when Birdman is on the court. Blue colors indicate that offensive players suffer when Birdman is on the court and Birdman brings the blue. See other players here.

Birdman defense

The graph shows how Birdman affects opposing FG% after adjusting for other defenders and the other offensive players on the court. Don’t take my word for it though, he also puts up amazing defensive xrapm stats.

Interior defenders affect opposing shot location. Wing defenders don’t.

After posting my adjusted defensive impact metrics yesterday, I said this on Twitter:

I was referencing the bars at the bottom of each player’s chart. Before I continue, let me explain how to read these. Here is Al Horford:

Horford locations

This means that when Horford is on the court as a defender, the probability that any given shot will be a close shot (which I define as <8 feet from the basket) is increased by 2%. The probability that any given shot will be a midrange shot is increased by 4%, and the probability that any given shot will be a 3 is decreased by 6%. These should sum to 0, although occasionally they may not due to rounding.

Now take another look at the adjusted defensive impact charts and compare, for example, Roy Hibbert to Paul George or, as @gswhoops mentions, Andrew Bogut to Andre Iguodala. The results show pretty consistently that big men tend to alter where an offense takes its shots. Wing defenders don’t. @WhrOffnsHppns asked if this might be a consequence of the method and as I sat at my work computer, with no access to my code, I realized that I couldn’t even really remember what the method was. I implemented this weeks ago and then just kinda forgot about it. So below the cut I outline the method in detail and look at some descriptives to buttress the big man findings. The short version though is that I do not think these results are just an artifact of the method and I want to double down on what I think is a true finding: “Interior defenders affect opposing shot location. Wing defenders don’t.”

Continue reading

2013-2014 Adjusted Defensive Impact by Court Location

I have finally completed work on my visual NBA stat: Adjusted Defensive Impact by Court Location.1 I first explained how this stat works here, but in a nutshell this is a way to visualize how a player defends shots in the NBA adjusting for the other defenders on the court with him, the expected probability of the shot being made, and the other (non-shooting) offensive players on the court.2 This new model also adds the possibility of a team-wide effect that you might attribute to coaching (this is not visualized in any way just yet). I had many requests to also include something about how players affect the location of a shot. You can now see this at the bottom of each player’s chart. This is a simple regression that controls for defensive players only and shows you how a given player affects the volume of shots that are close (<8 feet), midrange, or 3 pointers. I have lots more to say below the jump but here’s the widget, have fun poking around! Warm colors mean that opponents are more likely to hit a shot when the player is defending, cool colors mean opponents are less likely to hit their shots.

2013-2014 Adjusted Defensive Impact by Court Location

Continue reading

  1. This is all part of my master plan to call it “RADICL” when I get around to using ridge regression.
  2. Yes, this last bit is a new feature