Hi everyone,
I just wanted to know how to keep the max value per individual. I have this data:
id | months worked
1 | 20
1 | 24
2 | 15
2 | 40
3 | 10
4 | 5
5 | 5
5 | 10
So, I want to do something like this:
id | months worked
1 | 24
2 | 40
3 | 10
4 | 5
5 | 10
I hope you understand my idea. Thanks!!
Related Posts with Choosing the max value per individual
Not recounting new CEO roleIn my dataset, a director can have different roles each year. In my example, the director gets a new…
Exporting variable names, labels, and value codes for labelsHi all, I am trying to prepare a codebook document that provides details on all variables (includin…
Do I add mediator and control variables in Wooldridge test for autocorrelation on Stata?Hi everyone, I am conducting the Wooldridge test for serial autocorrelation for my mediation analysi…
Building time windows from years, starting from most recent yearDear all, I have some panel data containing countries and years. I need to build three-year time wi…
Removing duplicate words from a string variableI have a variable with a row of ICD codes. Some of them are repeated One registration looks like thi…
Subscribe to:
Post Comments (Atom)
0 Response to Choosing the max value per individual
Post a Comment