This exercise will use a subset of the European Social Survey(ESS) data which should be opened within Stata. The subset can be accessed from the link below:
Suppose that you wished to compare electoral turnout (where 1 = voted, 0 = did not vote) across different countries, in Stata the relevant command would be.
bysort country: tabulate turnout
This will list the percentages who voted and did not vote for each value of the variable 'country'. The first few lines of the output should be as follows.
---------------------------------------------------- -> country = AT turnout | Freq. Percent Cum. ------------+----------------------------------- 0 | 50 18.38 18.38 1 | 222 81.62 100.00 ------------+----------------------------------- Total | 272 100.00 ------------------------------------------------------ -> country = BE turnout | Freq. Percent Cum. ------------+----------------------------------- 0 | 30 10.91 10.91 1 | 245 89.09 100.00 ------------+----------------------------------- Total | 275 100.00 ------------------------------------------------------- -> country = CH turnout | Freq. Percent Cum. ------------+----------------------------------- 0 | 77 30.31 30.31 1 | 177 69.69 100.00 ------------+----------------------------------- Total | 254 100.00
While direct inspection of the distribution of a micro variable separately for each macro unit may be appropriate with a relatively small number of macro units, it might be tedious and unhelpful with a large number.