Simulate Entire Game
Closed this issue · 1 comments
I am interested in simulating an entire game and summarizing the final score and the counting stats. Do you know of anyone that has adapted this package for that purpose?
My initial thought is that current score would need to be added as variables for the sample_play function. Time for the play to be run would need to be added as an output from the function. Then a new function could be written to string drives together, using the final result of the prior drive as the initial parameters for the subsequent drive. Kickoffs will need to be simulated after scores. The entire function could be initiated with the predicted point spread for the game and pass/run tendencies for each team.
Thoughts on how this may be done are appreciated. Thanks!
Sorry for the late response. I am not sure what happened to the github notification, but I missed this somehow. In any case, if this is still a problem, here is how I would proceed. Note that you have to make a few assumptions unless you happen to re-write some of the code to keep track of a game time variable.
- Compute an empirical distribution for the number of drives per game.
- Sample a number of drives, say N, from that distribution
- Use the sample_drive function (single drive only) and simulate the number of drives from 2. You will have to keep track of the yard line and other values.
- Record the score after N drives
- Repeat 2 - 4 large # of times.
Obviously, this has its drawbacks, but it should give you a basis to build upon. Good luck!