I have the following situation:
Code:
+--------------------------------+
| pidp wave max_class |
|--------------------------------|
1. | 280165 2 Service class |
2. | 280165 3 . |
3. | 541285 3 . |
4. | 541965 3 . |
5. | 665045 3 . |
|--------------------------------|
6. | 956765 2 . |
7. | 956765 3 . |
8. | 987365 2 . |
9. | 987365 3 . |
10. | 1114525 2 . |
|--------------------------------|
11. | 1126765 2 . |
12. | 1558565 2 Working class |
13. | 1558565 3 . |
14. | 1833965 2 . |
15. | 1833965 3 . |
+--------------------------------+For this purpose, I'm using the following code:
Code:
bysort pidp wave (max_class) : replace max_class=max_class[1]
Do you have any hints?
Thanks for your support
0 Response to issue with replacing values with bysort
Post a Comment