Hi I have a data set of athletes training times per day as well as the date the training was held. I wish to identify when the athlete passes 500,1000 and 2000 training minutes. So far I have used
bysort athlete_id: gen total_training_minutes= sum(minutes)
This has helped me obtain the cumulative training minutes of the athletes. After that I used drop total_training_minutes if <500 to identify the date which the athlete surpassed the 500 mark. Now, I wish to do the same with 1000 and 2000 minutes. I was thinking of using drop if total_training_minutes<1000 but then I would lose the data on when the athlete passed 500 minutes. Any advice on how to identify the date where the athlete passed 1000 training minutes without dropping the data when the athlete passed 500?
Thank you.
Related Posts with Identifying when a variable passes a certain threshold
Graph bar chart with string variablesThere are basically 4 groups of variables. I want to graph a bar chart that has 3 slices, nation-wid…
How to construct a 95% confidence interval for a solved regression equation?I have solved a regression equation in order to find a CEO's salary after ten years. The equation is…
If else loop in StataHi, I wrote a code like if x=="x1"|x=="x2" { replace z=y replace a=b } However, it did not work. I…
Probit: comparing effects between dummy variablesHi all, first of all: sorry if my description of the problem is not "on point" - my main problem is…
How to get AIC/BIC after fitting mixed lear regression on imputed dataI am wondering if any body would help me in getting AIC?BIC for multiple imputed data and analyzed u…
Subscribe to:
Post Comments (Atom)
0 Response to Identifying when a variable passes a certain threshold
Post a Comment