Announcement

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

  • Specific descriptive

    Hi all,

    I am working on my descriptive statistics, and I would like to create a table that's different to what I have done before. Basically, I have panel data and a variable called "Minimum". This variable indicates the minimum percentage of women in a workplace.

    As each country has a different regulation establishing the minimum percentage, every firm will have their own country's "minimum".

    The Actual figure is the actual percentage of women that the specific firm has.
    Firm Var1 Var2 Actual Minimum Year
    1 1 1 21 20 2001
    1 2 2 19 20 2001
    2 3 3 30 25 2004
    2 4 4 25 25 2004
    3 5 5 5 10 2000
    3 6 6 15 10 2000
    I want my descriptives to show the mean and median of Var1 and Var2 of the firms that comply with the regulations (i.e. the firms whose Actual is equal or higher than the Minimum) and separatedly, the mean and median of the firms that do not comply. Something like this:
    Comply Not comply
    Mean Median Mean Median
    Is there a way to do so?

    Thank you very much!

    Carla

  • #2
    Code:
    gen comply = actual >= minimum
    estpost tabstat var1 var2, by(comply) s(mean median) c(s) not 
    esttab ., c("mean p50") unstack

    Comment


    • #3
      Thanks a lot!

      Comment

      Working...
      X