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 |     
----------------+-----------------------+-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
0 Response to Distribution of gender within subgroups of a group
Post a Comment