Provides a breakdown of the values taken on by a variable, or by two or more variables. It can be abbreviated tab.
Typical Usuage:
tab varx   - or -
tab varx vary   - or -
tab varx, sum(vary)
. tab religion
respondent' |
s religion | Freq. Percent Cum.
------------+-----------------------------------
Christian | 254 23.09 23.09
Muslim | 840 76.36 99.45
Other | 6 0.55 100.00
------------+-----------------------------------
Total | 1,100 100.00
The last column gives the cumulative percentage.
. tab religion gender
respondent |
's | respondent's gender
religion | male female | Total
-----------+----------------------+----------
Christian | 118 136 | 254
Muslim | 444 396 | 840
Other | 3 3 | 6
-----------+----------------------+----------
Total | 565 535 | 1,100
The numbers presented here are frequencies.
. tab religion, sum(hhsize)
respondent' | Summary of household size
s religion | Mean Std. Dev. Freq.
------------+------------------------------------
Christian | 6.9606299 4.7003516 254
Muslim | 7.6521739 4.6356781 828
Other | 8.1666667 6.5853372 6
------------+------------------------------------
Total | 7.4935662 4.6668156 1088
This shows the average household size (and the standard deviation and
frequenct) based on the religion of the respondent. There were
254 Christian respondents, with an average household size of 6.96.
. tab religion gender, col nofreq
respondent |
's | respondent's gender
religion | male female | Total
-----------+----------------------+----------
Christian | 20.88 25.42 | 23.09
Muslim | 78.58 74.02 | 76.36
Other | 0.53 0.56 | 0.55
-----------+----------------------+----------
Total | 100.00 100.00 | 100.00
. tab religion gender, chi2
respondent |
's | respondent's gender
religion | male female | Total
-----------+----------------------+----------
Christian | 118 136 | 254
Muslim | 444 396 | 840
Other | 3 3 | 6
-----------+----------------------+----------
Total | 565 535 | 1,100
Pearson chi2(2) = 3.2026 Pr = 0.202
Here the p-value is 0.202, so the distribution among religions is not significantly different
for male and female respdonents.
contact: djiboliz@gmail.com
last modified: 26 April 2007