Announcement

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

  • Distribution of gender within subgroups of a group

    Hi!

    I want to do demographics on my data. I have an outcome variable called hypertension (0/1). If patients have hypertension, I have used:
    Code:
    tab hypertension ethnicity
    ETHNICITY  |      hypertension
    CATEGORY |         0          1      |     
    ----------------------+--------------------
               White |    2040         982 |    
               Black |     1432     1,004 |    
          Hispanic |     987          331 |      
              Asian  |     520            78 |     
    ----------------+-----------------------+-
    To see how the distribution of patients with hypertension within different ethnicity categories.

    I would now like to see, within the different ethnicities, the distribution of gender which have hypertension. Is there any quick way to do this?
    Code:
    * Example generated by -dataex-. 
    clear
    input double ethcat float(gender hypertension)
    1 0 0
    1 1 0
    1 0 0
    1 0 1
    3 0 0
    4 1 0
    1 0 0
    4 1 1
    2 1 0
    end
    label values ethcat ethcat
    label def ethcat 1 "White", modify
    label def ethcat 2 "Black", modify
    label def ethcat 3 "Asian", modify
    label def ethcat 4 "Hispanic", modify


  • #2
    maybe,
    Code:
    table ethcat gender hypertension, nototals

    Comment


    • #3
      Yes! Worked really well. Thank you!

      Comment

      Working...
      X