Recently Roger adviced us on how to get a scalar value of the column sum
by
summ x
scal sidney=r(sum)
Works OK, for the most of the statistics, but I need the mode. After
short look on manuals, no funtion returns r(mode). Currently I'm using
egen and picking an observation from the created variable, but there
must be an easy way.
One fundamental problem here is that the mode is not necessarily unique, as
many discrete values of a variable can have an equal frequency, and that
frequency may be the highest frequency. You would have to specify which
mode to use in such cases.