| calculate_expected_goals_v2 | R Documentation |
calculate_expected_goals_v2() calculates version 2 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, and rush indicators.
calculate_expected_goals_v2(play_by_play)
calculate_xG_v2(play_by_play)
play_by_play |
data.frame of play-by-play(s); see |
data.frame with one row per event (play) and added xG_v2 column
# May take >5s, so skip.
test <- gc_play_by_play()
test <- calculate_expected_goals_v2(test)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.