Dear all, I have a similar situation as in the example below. Data is long and I need to generate a new variable from var_a and var_b that should look like var_ab.
I obviously cannot do this with egen var_ab=rowmax(var_a var_b).
I really appreciate some help on this,
Thank you very much in advance,
Rui
I obviously cannot do this with egen var_ab=rowmax(var_a var_b).
I really appreciate some help on this,
Thank you very much in advance,
Rui
id | var_a | var_b | var_ab |
1 | 1 | 3 | 1 |
1 | 2 | 4 | 2 |
1 | 3 | ||
1 | 4 | ||
1 | |||
1 | |||
2 | 5 | 7 | 5 |
2 | 6 | 8 | 6 |
2 | 7 | ||
2 | 8 | ||
2 | |||
2 |
Comment