| calculate_expected_goals_v3 | R Documentation |
calculate_expected_goals_v3() calculates version 3 of the expected goals
for all the events (plays) in a play-by-play using a pre-estimated logistic
regression model of goal probability on distance, angle, empty net, strength
state, rebound, rush, and goal differential.
calculate_expected_goals_v3(play_by_play)
calculate_xG_v3(play_by_play)
play_by_play |
data.frame of play-by-play(s); see |
data.frame with one row per event (play) and an added xG_v3
column containing expected goals for applicable shot attempts.
# May take >5s, so skip.
test <- gc_play_by_play()
test <- calculate_expected_goals_v3(test)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.