Hello, I have not found a command to compare the values of different variables. For example, let's say I have 3 variables: var1, var2 and var3. Each variable contains a constant across all observations, var1=1, var2=2 and var3=3. I am looking for a command that keeps the variable that takes the maximum value across all variables (which in this case is var3), or at least identifies that variable (for example, the result of the command may be "var3", like the result of a "display" command).
My dataset contains 1000 variables of this kind (constant values across all observations), so doing so manually is not feasible (like in the example).
Thanks in advance
My dataset contains 1000 variables of this kind (constant values across all observations), so doing so manually is not feasible (like in the example).
Thanks in advance
Comment