Can someone kindly explain how I can calculate the mean of each wealth category by race or other characteristic.
Code:
egen byte wealth_2 = cut(wealth2r) if !missing(wealth2r), at(0 200000 500000 1000000 2500000 10000000) label
And a sample of my data:
Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input float wealth2r byte race
1262417.4 3
 326552.2 2
 797981.5 2
 440690.9 2
 551585.2 2
562483.44 2
 379260.2 2
  2232807 3
 318216.6 2
 7665.786 2
247291.94 2
1157199.4 3
11509.907 2
 53963.01 2
 651307.8 3
1620652.5 3
 765447.8 3
 502245.7 3
1224702.8 3
1093764.9 2
249087.17 3
 322192.8 2
193394.97 3
 709792.6 3
 97435.93 2
226552.17 3
 356162.5 2
 395508.6 2
 47723.91 2
182298.55 2
 862533.6 3
 566710.7 2
 522624.8 2
 954821.6 3
 993133.4 2
221928.66 2
 433949.8 2
 938244.4 3
  3391017 3
2577.2786 2
 755511.2 3
 372523.1 2
 277410.8 2
 549537.6 3