I am trying to count the number of times an NFL has won a game in their last four games. I already have a dummy variable representing the outcome of the game. I think the idea would be to generate the id for each game after sorting them in order by team and game time and then count the dummy variable outcomes from the last four observations. I'm not entirely sure how to go about the syntax/loop as I'm not super familiar doing these things in stata. Let me know if any more information is needed. I would probably have to drop the first four games in each season as well.
Related Posts with Creating a Variable to Measure Recent Performance
How to do DID Analysis using stata?Hello everyone, I am a student at a university and i am very new to DID analysis. The purpose of my …
Specify interaction/square terms with xtabond2 & xtdpdgmmDear all, First of all, I would like to confirm that I have searched and read many posts here but n…
how to separate the result by regionI have a number of variables. the variables are insurance types, a region of address, and another 5 …
Generating change in levels as well as percentages from stataHi All, I have a dataset which resembles the following: x y 1 2 2 4 3 6 I have two variables her…
Intra-obsever variabilityDear colleagues can I still use kap in stata for intra-observer variability? I have two readings by …
Subscribe to:
Post Comments (Atom)
0 Response to Creating a Variable to Measure Recent Performance
Post a Comment