In my original data, I have a n x 2 matrix. I now want to generate a new column, containing a dummy variable indicationg whether the element in column 1 is greater than the element in column 2.
Alternatively, I managed to generate a new data file containing the difference between the two columns (And then adding it with the Join function). This new file contains values ranging from -6 up to 6. However, I did not manage to assign dummies to these values.
The general idea is that I want a value of 1 is the element in the first column is larger, otherwise a 0 (Or likewise 1 if the element is positive in my own generated data, or 0 otherwise). The values of the two columns are never identical either.
My question now is: how do generate a dummy variable for a whole column? I have the two above mentioned opportunities to create the dummy, but with neither data did I reach my goal.
Thanks for your support.