Announcement

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

  • probit model: partial effects of a one-SD increase on dep. variable

    Dear Statalist community,

    I'm using a probit model to analyze the determinants of free trade agreements (FTA). The dependent variable FTA is binary: 1, if an FTA between a country pair exists, 0 otherwise.
    So far I'm using:
    Code:
    margins, dydx(*) atmeans
    which gives me marginal effects on the response probability of FTA.

    However, I would need the partial effect of a one standard deviation change (and not of a marginal change) in the indep. variable on the response probability of FTA.

    Can you help me here?
    Thank you.

  • #2
    The simplest way I can think of is to go back and re-run the probit model with that independent variable standardized. So something like this:

    Code:
    my probit command as I already ran it
    egen std_ind_var = std(ind_var) if e(sample)
    probit dep_var std_ind_var other variables
    margins, dydx(*) atmeans

    Comment


    • #3
      Thank you!

      Unfortunately I encountered two other problems where I would like to ask for help:

      1) Now I have the partial effect of a one standard deviation "increase" in the ind. var., how can I get the partial effect of a one standard deviation "decrease"? (Both effects are different due to nonlinearities)

      2) I have an independent variable REMOTE ("remoteness from rest of the world") that is the product of a continuous variable (DISTANCE) and a binary variable (SAME_CONTINENT). It measures the distance of a country pair from the rest of the world, but only if the two countries of the country pair are on the same continent. If they are not on the same continent, REMOTE=0. Therefore the mean value is economically meaningless.

      Therefore I would like to split up the estimation of partial effects into A) for country pairs where both countries are on the same continent and B) country pairs where both countries are on different continents:
      A) use for DISTANCE and REMOTE the means of the variables only for country pairs where both countries are on the same continent.
      B) use for REMOTE zero and for DISTANCE the mean of the variable only for country pairs where both countries are on different continents.

      How can I do this split up in Stata?
      I would greatly appreciate your help here!
      Last edited by Thomas Wimmer; 13 Apr 2016, 12:58.

      Comment


      • #4
        Try -findit spost13_ado- and see if its listcoef and mchange commands do what you want. Here are some examples:


        Code:
        webuse nhanes2f, clear
        
        . probit diabetes weight, nolog
        
        Probit regression                               Number of obs     =     10,335
                                                        LR chi2(1)        =      47.11
                                                        Prob > chi2       =     0.0000
        Log likelihood = -1975.5113                     Pseudo R2         =     0.0118
        
        ------------------------------------------------------------------------------
            diabetes |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
        -------------+----------------------------------------------------------------
              weight |   .0089856    .001298     6.92   0.000     .0064415    .0115297
               _cons |  -2.324137   .0994205   -23.38   0.000    -2.518997   -2.129276
        ------------------------------------------------------------------------------
        
        . listcoef, std
        
        probit (N=10335): Unstandardized and standardized estimates 
        
          Observed SD:  0.2144
            Latent SD:  1.0095
        
        -------------------------------------------------------------------------------
                     |         b        z    P>|z|    bStdX    bStdY   bStdXY     SDofX
        -------------+-----------------------------------------------------------------
              weight |    0.0090    6.922    0.000    0.138    0.009    0.137    15.356
            constant |   -2.3241  -23.377    0.000        .        .        .         .
        -------------------------------------------------------------------------------
        
        . mchange
        
        probit: Changes in Pr(y) | Number of obs = 10335
        
        Expression: Pr(diabetes), predict(pr)
        
                     |    Change    p-value 
        -------------+----------------------
        weight       |                      
                  +1 |     0.001      0.000 
                 +SD |     0.013      0.000 
            Marginal |     0.001      0.000 
        
        Average predictions
        
                     |         0          1 
        -------------+----------------------
          Pr(y|base) |     0.952      0.048 
        
        
        . mchange, centered
        
        probit: Changes in Pr(y) | Number of obs = 10335
        
        Expression: Pr(diabetes), predict(pr)
        
                     |    Change    p-value 
        -------------+----------------------
        weight       |                      
         +1 centered |     0.001      0.000 
        +SD centered |     0.012      0.000 
            Marginal |     0.001      0.000 
        
        Average predictions
        
                     |         0          1 
        -------------+----------------------
          Pr(y|base) |     0.952      0.048
        .

        I highly recommend Long & Freese's book:

        http://www.stata.com/bookstore/regre...ent-variables/
        -------------------------------------------
        Richard Williams, Notre Dame Dept of Sociology
        StataNow Version: 19.5 MP (2 processor)

        EMAIL: [email protected]
        WWW: https://www3.nd.edu/~rwilliam

        Comment


        • #5
          For 1), after what was suggested in #2, do this:
          Code:
          gen reversed_std_ind_var = - std_ind_var
          probit dep_var reversed_std_ind_var other variables
          margins, dydx(*) atmeans
          For 2), you shouldn't have done it that way. Use factor-variable notation and -margins- will handle all of this automatically if you use factor variable notation (-help fvvarlist-) instead of calculating products.

          Code:
          probit dep_var other variables i.same_content##c.distance
          margins, dydx(distance) over(same_continent) atmeans

          Comment


          • #6
            For 2) Is there absolutely no chance of doing that with the variable I created by manually multiplying?

            Comment


            • #7
              I am sure there's some way, but it would take me a while to figure it out, it would involve several lines of code, and the chances I'd make a mistake are substantial. Why do you want to do it the hard way? The -margins- command and factor-variable notation were created precisely for situations like this: to make the tedious and error-prone calculations associated with interaction terms simple, fast, and flawless.

              Comment


              • #8
                Following up on #7. There might be a way to do it more easily than what I would come up with (though certainly nothing is easier than using -margins-) using the old -mfx- command, or with -spost13.ado-. The former is available from SSC and the latter, I believe, is from Stata Journal. I'm not really sure as I have never used either of these, but they deal with these kinds of general problems. -mfx- in particular predates factor variable notation, and does much of what -margins- does, so it might be just the thing. But unless your probit model takes a really long time to run, it will probably be more efficient use of your time to follow my suggestions in #5 than to dig up these other programs and learn them.

                Comment


                • #9
                  I will do it with the -margins- command and factor-variable notation! I tought i only had the manually computed variable left in my final dataset, but luckily I have both variables I used to create REMOTE.

                  You helped me a lot, Clyde, thank you!!
                  Last edited by Thomas Wimmer; 13 Apr 2016, 14:17.

                  Comment

                  Working...
                  X