i'm using Stata 16.
I am trying to calculate the mean of the frequency values (second column) of a tab result:
Code:
. tab bin if year == 2005
bin | Freq. Percent Cum.
------------+-----------------------------------
-97.5 | 6 0.26 0.26
-94.5 | 4 0.17 0.43
-91.5 | 10 0.43 0.86
-88.5 | 10 0.43 1.28
-85.5 | 9 0.39 1.67
-82.5 | 6 0.26 1.93
-79.5 | 10 0.43 2.35
-76.5 | 14 0.60 2.95
-73.5 | 11 0.47 3.42
-70.5 | 22 0.94 4.37
-67.5 | 12 0.51 4.88
-64.5 | 20 0.86 5.74
-61.5 | 18 0.77 6.51
-58.5 | 22 0.94 7.45
-55.5 | 21 0.90 8.35
-52.5 | 22 0.94 9.29
-49.5 | 29 1.24 10.53
-46.5 | 35 1.50 12.03
-43.5 | 31 1.33 13.36
-40.5 | 18 0.77 14.13
.
.
.
------------+-----------------------------------
Total | 2,336 100.00Code:
tab bin if year == 2005, matcell(freqs)
0 Response to Mean of frequency from tab
Post a Comment