Hi, I have the "have" variable and based on that "have" variable, I want to generate the two variables, i.e., "want1" & "want2".

Please see the example below.


Code:
* Example generated by -dataex-. For more info, type help dataex
clear
input double(id have want1 want2)
1 0 5 0
1 0 4 0
1 0 3 0
1 0 2 0
1 1 1 1
1 0 0 2
1 0 0 3
1 0 0 4
1 0 0 5
1 0 0 6
2 0 3 0
2 0 2 0
2 1 1 1
2 0 0 2
2 0 0 3
2 0 0 4
2 0 0 5
2 0 0 6
end
the two "want" variables are basically sequence of numbers that are based on value of "have" variable.

Thanks.