Please assist to create
1. A variable which will take the maximum value from three variables (
sum_rough, sum_inst , sum_public)
for each record. Data is longitudinal and has repeated observations "sum..." for each time period. So basically the new variable is repeated for each record in the same time period same as the sum variables shown below.2. Create another variable which will "tag" the name of the variable with the maximum obervations
Example data shown below:
input byte id float time float sum_rough float sum_inst float sum_public
1 1 3 2 2
1 1 3 2 2
1 2 4 6 8
1 2 4 6 8
2 1 0 2 3
2 2 3 6 8
2 3 4 5 1
0 Response to Create 2 new variables taking the "maximum" value and tag the variable with maximum value
Post a Comment