I am working with play-by-play data on the NFL.
In my dataset, I have a variable named GameID, a unique identifier for every game, a variable named Quarter, for the quarter that a play takes place in, a variable called Yards, the Yards gained in a play, and finally Run, a dummy variable that equals 1 if the play was a run.
I wish to create a new variable that gives the average yards per rush in each quarter for a given game. Help on how I can create such a variable would be greatly appreciated.
Thanks in advance
In my dataset, I have a variable named GameID, a unique identifier for every game, a variable named Quarter, for the quarter that a play takes place in, a variable called Yards, the Yards gained in a play, and finally Run, a dummy variable that equals 1 if the play was a run.
I wish to create a new variable that gives the average yards per rush in each quarter for a given game. Help on how I can create such a variable would be greatly appreciated.
Thanks in advance
Comment