Why is this not working?
Code:
. sysuse auto, clear
(1978 Automobile Data)

. summ price

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
       price |         74    6165.257    2949.496       3291      15906

. egen meanprice = mean(price/r(max)), by(rep)
(74 missing values generated)

. summ meanprice

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
   meanprice |          0

.