Announcement

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

  • Percentage of a variable depending on different income bins

    I'm trying to find out depending on the variation of income what percentage of a particular income bin can afford one/multiple/no health providers? Here, I''ve created the income bins like the following way:

    Code:
    gen inc10=(income2==1)
        gen inc15=(income2==2)
        gen inc20=(income2==3)
        gen inc25=(income2==4)
        gen inc35=(income2==5)
        gen inc50=(income2==6)
        gen inc75=(income2==7)
        gen inc75p=(income2==8)
    [CODE]

    This the different value of one person having the access to single/mutiple health/no providers . How can I find the percentage of people having access to the healthcare providers ( single /multiple ) given the different income bins ?

    Code:
    qui gen one_hcare_provider = (persdoc2==1)
        qui gen multi_hcare_provider = (persdoc2==2)
        qui gen no_hcare_provider = (persdoc2==3)
    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input double(income2 persdoc2 hlthpln1)
     5 2 1
     7 1 1
     7 2 1
     7 1 1
    77 1 1
    99 1 1
    77 2 1
     7 1 1
     8 1 1
     6 1 1
     5 2 1
    99 1 1
     8 1 1
     1 2 1
    99 1 1
     8 1 1
     7 1 1
    77 1 1
     1 1 1
     4 1 1
     3 3 1
     8 2 1
    77 1 1
    99 1 1
    99 1 1
     5 2 1
     6 1 1
     3 1 1
     8 1 1
    77 1 1
     7 1 1
    99 1 1
     6 1 1
     4 1 1
     5 1 2
     3 1 1
     7 1 1
    99 1 1
    99 1 1
    99 1 1
    77 1 1
     8 1 1
     2 1 1
     2 1 1
     8 1 1
    99 1 1
     8 1 1
     6 1 1
    99 2 1
     6 1 1
    77 1 1
    99 2 1
     5 1 1
     4 1 1
     5 1 1
     8 1 1
    77 1 1
     8 1 1
     6 1 1
    99 1 1
    99 1 1
     8 1 1
    99 2 1
     3 1 1
     7 1 1
     6 3 1
     8 1 1
     8 1 1
     7 3 1
     3 1 1
     8 1 1
    99 2 1
     4 2 1
     3 1 1
    77 1 1
    99 1 1
    99 3 1
     8 1 1
     3 3 2
    77 1 1
     1 1 1
     8 1 1
     2 1 1
    99 2 1
     5 1 1
     1 3 2
     7 1 1
    99 1 1
    99 1 1
     2 3 1
     8 1 1
     7 1 1
    99 2 1
     5 1 1
     8 1 1
     5 1 1
     7 1 1
     8 1 1
    99 1 1
    77 1 1
    end

  • #2
    I found the following command useful but not entirely sure this is really helpful for my analysis. This shows only the percentage of people having access to healthcare providers of total people having the same bin of income. What if I would like to see how a particular person of a certain income bin - having the access to healthcare providers - as a percentage of all the people ( irrespective of income bins ) having access to health care providers?

    Code:
    tabulate one_hcare_provider income2, nofreq column chi2
    Last edited by Tariq Abdullah; 01 Nov 2021, 05:19.

    Comment


    • #3
      First, for a better view on the result of #2:
      Code:
      tabulate income2 one_hcare_provider , nofreq row chi2
      Next, percentages are calculated columnwise as to report these by income bin vs. all the people - albeit by the two groups:
      Code:
      tabulate income2 one_hcare_provider , nofreq column chi2
      http://publicationslist.org/eric.melse

      Comment


      • #4

        That's so kind of you for pointing in the right direction. It was definitely very helpful to explore the data in other ways to fit with my research goal! highly appreciate this feedback!

        Comment

        Working...
        X