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
Panel Data Help - "Repeated Time Values"Hi STATA Community! I have a question regarding panel data [this is my first time using the command…
Table of stored values after estat sbsingle or sbcusum?I am trying to make a table of p values and chi-squared test statistics(or r(cusum)s) after estat sb…
forvalues with counterHello, I am a PhD student and I have not been using Stata that long (about a year) so my apologies …
Backward eliminationArray Hey I have this regressive model here and need to use backwards elimination to remove non sig…
PhDDear Statalist Community, Please, I need help on an updated causality test that also tests the reve…
Subscribe to:
Post Comments (Atom)
0 Response to Creating a Variable to Measure Recent Performance
Post a Comment