Announcement

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

  • Testing joint significance of multiple coefficients in probit after margins

    Hi. After probit I am calculating marginal effects via
    Code:
    magins, dydx(*)
    .
    Then I want to jointly test that covariates are equal to 0 and get chi statistic. How should I do that? I found some parameter called "contrast" but this does not work.

  • #2
    Originally posted by Mats Krasinski View Post
    After probit . . . I want to jointly test that covariates are equal to 0 and get chi statistic. How should I do that?
    It's already right there in the header of the probit regression output.

    Look in the upper-right side and you'll see LR chi2(<df>) = <some value>.

    That's it.

    Comment


    • #3
      Originally posted by Joseph Coveney View Post
      It's already right there in the header of the probit regression output.

      Look in the upper-right side and you'll see LR chi2(<df>) = <some value>.

      That's it.
      Thank you for replying. It is for probit's coefficients but I need for coefficients of marginal effect.

      Comment


      • #4
        Does this give you what you want?

        Code:
        webuse nhanes2f, clear
        probit diabetes i.black i.sex height weight, nolog
        margins, dydx(*) post
        testparm i.black i.sex height weight
        Code:
        . webuse nhanes2f, clear
        
        . probit diabetes i.black i.sex height weight, nolog
        
        Probit regression                                       Number of obs = 10,335
                                                                LR chi2(4)    = 152.46
                                                                Prob > chi2   = 0.0000
        Log likelihood = -1922.8344                             Pseudo R2     = 0.0381
        
        ------------------------------------------------------------------------------
            diabetes | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
        -------------+----------------------------------------------------------------
               black |
              Black  |   .2390503   .0617771     3.87   0.000     .1179695    .3601311
                     |
                 sex |
             Female  |  -.1545867    .061044    -2.53   0.011    -.2742308   -.0349426
              height |  -.0278796   .0033436    -8.34   0.000    -.0344328   -.0213263
              weight |   .0141805   .0014354     9.88   0.000     .0113671    .0169938
               _cons |   1.996139   .5546783     3.60   0.000     .9089894    3.083289
        ------------------------------------------------------------------------------
        
        . margins, dydx(*) post
        
        Average marginal effects                                Number of obs = 10,335
        Model VCE: OIM
        
        Expression: Pr(diabetes), predict()
        dy/dx wrt:  1.black 2.sex height weight
        
        ------------------------------------------------------------------------------
                     |            Delta-method
                     |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
        -------------+----------------------------------------------------------------
               black |
              Black  |   .0267878   .0079284     3.38   0.001     .0112484    .0423272
                     |
                 sex |
             Female  |  -.0152008   .0061195    -2.48   0.013    -.0271948   -.0032067
              height |  -.0026978   .0003313    -8.14   0.000    -.0033471   -.0020485
              weight |   .0013722   .0001433     9.58   0.000     .0010914     .001653
        ------------------------------------------------------------------------------
        Note: dy/dx for factor levels is the discrete change from the base level.
        
        . testparm i.black i.sex height weight
        
         ( 1)  1.black = 0
         ( 2)  2.sex = 0
         ( 3)  height = 0
         ( 4)  weight = 0
        
                   chi2(  4) =  136.19
                 Prob > chi2 =    0.0000
        
        .
        -------------------------------------------
        Richard Williams, Notre Dame Dept of Sociology
        StataNow Version: 18.5 MP (2 processor)

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

        Comment


        • #5
          Originally posted by Richard Williams View Post
          Does this give you what you want?

          Code:
          webuse nhanes2f, clear
          probit diabetes i.black i.sex height weight, nolog
          margins, dydx(*) post
          testparm i.black i.sex height weight
          Code:
          . webuse nhanes2f, clear
          
          . probit diabetes i.black i.sex height weight, nolog
          
          Probit regression Number of obs = 10,335
          LR chi2(4) = 152.46
          Prob > chi2 = 0.0000
          Log likelihood = -1922.8344 Pseudo R2 = 0.0381
          
          ------------------------------------------------------------------------------
          diabetes | Coefficient Std. err. z P>|z| [95% conf. interval]
          -------------+----------------------------------------------------------------
          black |
          Black | .2390503 .0617771 3.87 0.000 .1179695 .3601311
          |
          sex |
          Female | -.1545867 .061044 -2.53 0.011 -.2742308 -.0349426
          height | -.0278796 .0033436 -8.34 0.000 -.0344328 -.0213263
          weight | .0141805 .0014354 9.88 0.000 .0113671 .0169938
          _cons | 1.996139 .5546783 3.60 0.000 .9089894 3.083289
          ------------------------------------------------------------------------------
          
          . margins, dydx(*) post
          
          Average marginal effects Number of obs = 10,335
          Model VCE: OIM
          
          Expression: Pr(diabetes), predict()
          dy/dx wrt: 1.black 2.sex height weight
          
          ------------------------------------------------------------------------------
          | Delta-method
          | dy/dx std. err. z P>|z| [95% conf. interval]
          -------------+----------------------------------------------------------------
          black |
          Black | .0267878 .0079284 3.38 0.001 .0112484 .0423272
          |
          sex |
          Female | -.0152008 .0061195 -2.48 0.013 -.0271948 -.0032067
          height | -.0026978 .0003313 -8.14 0.000 -.0033471 -.0020485
          weight | .0013722 .0001433 9.58 0.000 .0010914 .001653
          ------------------------------------------------------------------------------
          Note: dy/dx for factor levels is the discrete change from the base level.
          
          . testparm i.black i.sex height weight
          
          ( 1) 1.black = 0
          ( 2) 2.sex = 0
          ( 3) height = 0
          ( 4) weight = 0
          
          chi2( 4) = 136.19
          Prob > chi2 = 0.0000
          
          .
          thank you very much. that's what I need.

          Comment

          Working...
          X