Announcement

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

  • Interacting gender and race variables

    Hello,

    This is my first time posting, so I apologize in advance if this question has been posted before. My question concerns interacting race and gender. Currently, I am putting together a descriptive statistics table, wage inequality being the dependent variable. I would like to include estimates by each race and gender category (black female, black male, white female, white male, Hispanic male, and Hispanic female). I'm not sure what's the best strategy to code these variables to then generate them in my table. Do I have to create one race dummy variable and one gender binary variable?

    Thanks,
    Brian

  • #2
    What does your dataset look like now? Consider the following for guidance on how one approach might look like.
    Code:
    sysuse auto
    rename rep78 race
    rename foreign sex
    rename turn income_inequality
    table race sex, contents(mean income_inequality)
    There are others, but you'd want to give more information about what you have and what you want so that others can help.

    Comment


    • #3
      Brian, if you just want Mean, SD and n in your table, tabulate with the summarize option works well. E.g., using the same data as Joseph in #2:

      Code:
      . tabulate race sex, summarize(income_inequality)
      
           Means, Standard Deviations and Frequencies of Turn Circle (ft.)
      
          Repair |
          Record |      Car type
            1978 |  Domestic    Foreign |     Total
      -----------+----------------------+----------
               1 |        41          . |        41
                 | 1.4142136          . | 1.4142136
                 |         2          0 |         2
      -----------+----------------------+----------
               2 |    43.375          . |    43.375
                 | 2.5035689          . | 2.5035689
                 |         8          0 |         8
      -----------+----------------------+----------
               3 | 41.703704  35.333333 | 41.066667
                 | 3.9789331  1.1547005 | 4.2502197
                 |        27          3 |        30
      -----------+----------------------+----------
               4 |        42         35 |      38.5
                 | 4.1533119        1.5 | 4.7060662
                 |         9          9 |        18
      -----------+----------------------+----------
               5 |        36  35.555556 | 35.636364
                 | 1.4142136  1.5092309 | 1.4333686
                 |         2          9 |        11
      -----------+----------------------+----------
           Total | 41.770833  35.285714 | 39.797101
                 | 3.8217718  1.4192553 | 4.4410508
                 |        48         21 |        69
      Obviously the variable and value labels are from the original variables, not the renamed variables. ;-)
      --
      Bruce Weaver
      Email: [email protected]
      Version: Stata/MP 19.5 (Windows)

      Comment

      Working...
      X