Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Calculating poverty

    Hi Stata Community ,

    I would like to calculate whether the family falls below the poverty threshold (yes/no binary) based on the total income of the family (income), the number of people in the household (householdpeople), the composition of the household (singlefamily), and the number of children below 15 years of age (minor).

    The thresholds for that period were:
    Lone parent with one child (aged under 15) = 169
    Lone parents with two children (aged under 15) = 208

    Couple with one child (aged under 15) = 234
    Couple with two children aged under 15) = 273

    Each additional child under 15 = 39
    Each additional adult, or child aged 15 or above = 65

    Could someone please help me solve this riddle?

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input float wanted int(householdpeople singlefamily) float minor
    22100 4 0 2
    36400 7 0 3
    22100 6 0 3
        . 6 0 3
    15080 5 0 3
    16120 4 1 3
    22100 6 0 3
    22100 5 0 3
    36400 3 0 1
        . 5 0 3
        . 5 0 3
    24700 4 0 1
     9880 4 0 1
    32500 4 0 2
     9880 4 1 3
     6760 4 1 2
    36400 4 0 1
        . 8 0 2
     6760 6 0 4
    11960 6 0 3
    24700 4 1 2
        . 6 0 3
    35100 6 0 4
    11960 4 1 3
    10920 4 0 1
        . 4 0 2
        . 4 1 1
    27300 4 0 2
     8840 6 0 2
    36400 4 0 2
    35100 6 0 4
     5720 5 0 3
        . 3 1 2
    11960 5 0 2
        . 5 0 2
        . 4 0 1
        . 6 0 4
    16120 3 0 1
        . 3 0 1
    27300 6 0 2
    16120 4 1 3
     6760 3 0 1
        . 6 0 4
    10920 3 1 2
        . 5 0 2
        . 3 0 1
    36400 4 0 2
    36400 4 0 1
     8840 4 0 2
    24700 6 0 3
     5720 2 1 1
     8840 3 0 1
    18200 3 1 2
    36400 5 0 3
     8840 3 1 2
        . 6 0 3
        . 5 0 3
        . 5 0 1
    29900 4 0 2
    22100 4 0 2
    16120 9 0 3
        . 5 0 1
    22100 4 0 2
    29900 3 1 2
        . 5 0 3
    10920 4 1 2
     4420 9 1 8
        . 5 0 2
    10920 6 0 2
    27300 8 0 3
    36400 5 0 3
    18200 5 0 2
    11960 4 0 2
    35100 4 0 2
    27300 6 0 2
    36400 3 0 1
        . 5 0 1
    36400 4 0 1
    19240 5 0 3
    11960 4 1 2
    13000 2 1 1
        . 6 1 4
        . 3 1 1
    35100 9 0 7
    36400 4 0 1
    36400 6 0 3
    36400 4 1 2
    35100 3 0 1
        . 5 0 2
     8840 3 1 2
    13000 7 0 5
    13000 5 0 3
    15080 3 1 2
     8840 7 0 4
    14040 2 1 1
    20280 4 0 2
    10920 7 0 5
    36400 6 0 3
        . 8 0 5
    22100 5 1 1
    end
    label values householdpeople W1qfhhno
    label values singlefamily W1famtyp2
    label def W1famtyp2 0 "No, not single parent household", modify
    label def W1famtyp2 1 "Yes, single parent household", modify
    ------------------ copy up to and including the previous line ------------------

    Listed 100 out of 15770 observations
    Use the count() option to list more
    [/CODE]

  • #2
    Code:
    gen adults = householdpeople - minor
    gen threshold = 65 + 39*minor + 65*adults
    Note: Your instructions do not define the threshold for a household with no adults, nor for one with no minors. This formula may or may not apply to such households. At least in your example data, however, there are no such households: every household has at least one adult and at least one minor.

    Comment


    • #3
      Originally posted by Clyde Schechter View Post
      Code:
      gen adults = householdpeople - minor
      gen threshold = 65 + 39*minor + 65*adults
      Note: Your instructions do not define the threshold for a household with no adults, nor for one with no minors. This formula may or may not apply to such households. At least in your example data, however, there are no such households: every household has at least one adult and at least one minor.
      Apologies for not specifying: yes - every household has at least one child and one adult .

      However, I am still unsure about how to collapse this into a binary now, i.e. whether a given household is falling under poverty threshold or not.

      Could you please help?
      Last edited by Sofiya Volvakova; 21 Oct 2023, 17:41.

      Comment


      • #4
        Well, within the example data you showed, you can't. Do decide which households are in poverty, you need to have the household income to compare with the threshold--but you have no such variable in the example data. Assuming there is a variable called income in your data set that shows the household income, then it's just:
        Code:
        gen byte in_poverty = income < threshold if !missing(income)

        Comment


        • #5
          ... assuming threshold is not missing, otherwise "in_poverty" will be coded as "0" (not missing). To take care of this possibility, you should use
          Code:
          gen byte in_poverty = income < threshold if !missing(income, threshold)

          Comment

          Working...
          X