Announcement

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

  • A question on the margins command

    Hello all,

    I have a question on the margins command, but before that, I'd like to give a bit of background.

    I'm interested in calculating the likelihood of someone losing their job, given a rise in the minimum wage. I've estimated the likelihood of someone being unemployed based on certain characteristics. As an additional step, I've also calculated the increase that each worker's wage would be for those below the proposed minimum. This is under the assumption that those furthest away from the minimum wage are more likely to lose their jobs.

    Now what I'd to is multiply the wage increase (in % terms) by the unemployment probability. However, here is where I get a bit stuck (unfortunately I don't have my output handy right now due to various reasons).

    In my probit I have race (Black, Asian, White), Age Group (15 - 24, 25-34, 35-44, 45-54, 55-65), urban (urban or rural), gender (male/female) and some other variables. Now, for the sake of argument, "White", "15 - 24", "urban" and "male" are the base groups, so the probability of being unemployed is relative to those groups.

    Now, let's assume further I have a Black, 35 -44, urban female in my dataset.

    Let's further assume the coefficients are 0.18; -0.15, 0.10 and -0.2.

    Now how do I get a cumulative, or overall probability, for each individual? I am pretty sure I cannot just add the 4 things together.

    Also, how would I do that in Stata - i.e. assign a cumulative probability based on the coefficients in a probit?

  • #2
    I am not sure what you exactly want to know. I suspect you want to know the probability of being unemployed given your model for a black, 35-44, urban female, a white 35-44, urban, female, etc. Notice that will result in a very long table, as there are many combinations possible. Here is how you get such a table:

    Code:
    // some data preparation
    sysuse nlsw88, clear
    gen byte marst = !never_married + married
    label variable marst "marital status"
    label define marst 0 "never married"     ///
                       1 "divorced/widowed"  ///
                       2 "married"
    label value marst marst
    
    gen byte ed = cond(grade <  12, 0,       ///
                  cond(grade == 12, 1,       ///
                  cond(grade <  16, 2, 3 ))) ///
                  if grade < .
    label variable ed "education"
    label define ed 0 "< highschool" ///
                    1 "highschool"   ///
                    2 "some college" ///
                    3 "college"
    label value ed ed
    
    label define south 1 "south" ///
                       0 "non-south"
    label value south south
    
    // the model
    probit union i.marst i.race i.south i.ed
    
    // make the table
    margins i.marst#i.race#i.south#i.ed
    ---------------------------------
    Maarten L. Buis
    University of Konstanz
    Department of history and sociology
    box 40
    78457 Konstanz
    Germany
    http://www.maartenbuis.nl
    ---------------------------------

    Comment


    • #3
      Hi Maarten,

      Thanks for this - sorry for the late reply.

      Now I'd like to go a step further:

      Beginning from the last command you showed:

      Code:
      // make the table margins i.marst#i.race#i.south#i.ed
      Is it possible you can insert those probablities into the dataset?

      In other words, the one probability from the margins command is this:

      Code:
      never married#white#non-south#< highschool  |   .2944769
      What I'd like to do is to create a new variable (probability of joining a trade union) and insert the various probabilities to the individuals who meet the criteria - in this case 'never married', 'white', 'non-south', 'less than high-school education' would have a probability of 0.2944749.

      Is this possible?

      Comment

      Working...
      X