Hello everyone. I have 5 variables as below:
Id d1 d2 d3 d4
1 2 2 3 4
i used egen=rowmin(d1-d4) rowmax(d1-d4) to find the min and max across d1-d4. Now how can I select the variable in between? in other words how can I select the second minimum value across d1-d4? in this case value 3.
I looked through other topics as of using rowranks and ranks but it did not help me.
I appreciate your help and suggestion.
Id d1 d2 d3 d4
1 2 2 3 4
i used egen=rowmin(d1-d4) rowmax(d1-d4) to find the min and max across d1-d4. Now how can I select the variable in between? in other words how can I select the second minimum value across d1-d4? in this case value 3.
I looked through other topics as of using rowranks and ranks but it did not help me.
I appreciate your help and suggestion.
Comment