EXERCISE 5 - ANSWER

What is the total number of African households who have the average number of births being greater than four?

Using the command egen, we want to get create a variable that is the average number of births per household. Note though that the number of births can sometimes take on a negative number which is noted in survey language as a valid skip. We want to incorporate that into the command.

egen avebir=mean(no_birth) if no_birth>=0, by(hhid)


Now we will tell STATA to tabulate the average number of births for African households if the average number of births is greater than four.

tab avebir if race==1 & avebir>4

     avebir |      Freq.     Percent        Cum.
------------+-----------------------------------
   4.333333 |          9        1.05        1.05
        4.5 |         47        5.47        6.51
          5 |        266       30.93       37.44
        5.5 |          6        0.70       38.14
   5.666667 |          7        0.81       38.95
          6 |        188       21.86       60.81
        6.5 |         26        3.02       63.84
          7 |         77        8.95       72.79
          8 |         83        9.65       82.44
          9 |         63        7.33       89.77
         10 |         19        2.21       91.98
         11 |         41        4.77       96.74
         12 |         28        3.26      100.00
------------+-----------------------------------
      Total |        860      100.00

From examining the total number of people, 860 households have an average birth rate higher than four births.

 

BACK TO EXERCISE QUESTIONS