Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Catch missing spread_line data #503

Merged
merged 1 commit into from
Jan 3, 2025
Merged

Catch missing spread_line data #503

merged 1 commit into from
Jan 3, 2025

Conversation

mrcaseb
Copy link
Member

@mrcaseb mrcaseb commented Jan 3, 2025

Fixes #502

vegas_wp variables were completely broken when spread_line data is NA.

The result is a bouncing win probability that doesn't make any sense.

image

We decided to avoid this extreme result by setting NA spread lines to 1.5 (~ home field advantage). However, since that is not the actual line, we warn the user and ask them to create an issue.

✖ The following game is missing valid spread lines: "2024_17_ARI_LA".
✖ nflfastR will manually set the spread for the home team to "1.5" points!
! If you see this, please reach out to the package maintainers <https://github.com/nflverse/nflfastR/issues>

The result of the manual overwrite looks far better, tho it is still wrong
image

@mrcaseb mrcaseb enabled auto-merge January 3, 2025 15:31
@mrcaseb mrcaseb requested a review from guga31bb January 3, 2025 15:31
Copy link

github-actions bot commented Jan 3, 2025

@mrcaseb mrcaseb disabled auto-merge January 3, 2025 15:52
@mrcaseb mrcaseb merged commit 363344d into master Jan 3, 2025
7 checks passed
@mrcaseb mrcaseb deleted the catch-na-spreads branch January 3, 2025 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Win probability of 2024_17_ARI_LA on rbsdm.com is not right.
2 participants