Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

WP calculator breaks when already providing wp #170

Closed
guga31bb opened this issue Jan 30, 2021 · 0 comments · Fixed by #171
Closed

WP calculator breaks when already providing wp #170

guga31bb opened this issue Jan 30, 2021 · 0 comments · Fixed by #171

Comments

@guga31bb
Copy link
Member

library(tidyverse)

data <- tibble::tibble(
  "receive_2h_ko" = 0,
  "home_team" = "SEA",
  "posteam" = "SEA",
  "score_differential" = 0,
  "half_seconds_remaining" = 1800,
  "game_seconds_remaining" = 3600,
  "spread_line" = 1,
  "down" = 1,
  "ydstogo" = 10,
  "yardline_100" = 75,
  "posteam_timeouts_remaining" = 3,
  "defteam_timeouts_remaining" = 3
)

nflfastR::calculate_win_probability(
  data %>% mutate(vegas_wp = .9)
) %>%
  pull(vegas_wp)

[1] 0.9

nflfastR::calculate_win_probability(
  data
) %>%
  pull(vegas_wp)

[1] 0.5147206
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant