I have 16 variables, each is continuous with values ranging from 0 to 10. I want to reduce it to a single variable that indicates which of the 16 variables has the largest value within that observation. I have 10,600 observations.

When ties are present, pick between the tying variables randomly. Values of 0 are common, but if all of the 16 variables have a value of 0, return a value of 0.

For example, here is a sample of what ten observations might look like, the same example in code, and the desired output:
ID cat1 cat2 cat3 cat4 cat5 cat6 cat7 cat8 cat9 cat10 cat11 cat12 cat13 cat14 cat15 cat16
1001 0 0 0 3 0 0 0 0 0 0 0 0 0 0 0 0
1002 0 0 0 0 0 3.5 0 0 0 5 0 0 0 0 0 0
1003 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1004 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1005 0 0 2 0 0 0 0 3 0 0 0 0 0 0 0 0
1006 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1007 0 0 4 0 0 0 0 0 0 0 0 4 0 0 0 0
1008 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1009 0 3.75 0 0 0 0 0 0 0 0 0 0 3.75 8 0 0
1010 0 0 0 0 0 0 0 5 0 0 0 0 0 0 0 5

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input int id byte cat1 float cat2 byte(cat3 cat4 cat5) float cat6 byte(cat7 cat8 cat9 cat10 cat11 cat12) float cat13 byte(cat14 cat15 cat16)
1001 0    0 0 3 0   0 0 0 0 0 0 0    0 0 0 0
1002 0    0 0 0 0 3.5 0 0 0 5 0 0    0 0 0 0
1003 0    0 0 0 0   0 0 0 0 0 0 0    0 0 0 0
1004 0    0 0 0 0   0 0 0 0 0 0 0    0 0 0 0
1005 0    0 2 0 0   0 0 3 0 0 0 0    0 0 0 0
1006 0    0 0 0 0   0 0 0 0 0 0 0    0 0 0 0
1007 0    0 4 0 0   0 0 0 0 0 0 4    0 0 0 0
1008 0    0 0 0 0   0 0 0 0 0 0 0    0 0 0 0
1009 0 3.75 0 0 0   0 0 0 0 0 0 0 3.75 8 0 0
1010 0    0 0 0 0   0 0 5 0 0 0 0    0 0 0 5
end
Desired Output
ID catSummary
1001 4
1002 10
1003 0
1004 0
1005 8
1006 0
1007 12
1008 0
1009 14
1010 8