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
Evaluating whether a vector of strings is in a dfIf I want to see whether a string is in a column at the most simplest, I can do something like: Exa…
HAZ scoreHi, I don't understand why there are still HAZ missing value on my data, even all my height, age, an…
itsa outputGood evening, I am running a time series analysis with multiple groups using ITSA. The initial data…
eivreg (with perfect reliability) is different than regressHi All, It seems to me that using eivreg with all reliabilities=1.0 should produce identical estimat…
Individual unit effect in xtregarHello Statalist, I am running a panel data fixed effect regression. The N=620, t=10. Given the autoc…
Subscribe to:
Post Comments (Atom)
0 Response to Creating a Variable to Measure Recent Performance
Post a Comment