Announcement

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

  • Interpretation of probit post-estimation test

    Hi Statalisters,

    I have a question about interpreting post-estimation tests in Stata. Suppose I estimate a Probit regression to predict whether someone passes a test as a function of their sex (sex = {1,2}) and their level of education (educ={1,2,3}):

    probit pass i.sex##i.educ

    I then wish to test whether the predicted probability of passing the test is the same between sexes within each education group:

    margins r.sex , at(educ=(1(1)3)) asobserved

    The output in Stata includes a chi2 statistic and a p-value. My understanding is that this is asking Stata to test a linear restriction of model parameters, which can be done with, e.g., Wald or LR tests, both of which have associated test statistics that are chi-square distributed under the null of equality of the parameters. Which test is Stata doing here to generate the p-value? Or perhaps I am misinterpreting the output somehow? Any thoughts would be very helpful.

    Thank you in advance!

    - Roamie

  • #2
    It has been a while since you last posted and there you had indicated that you were in the process of requesting that your name be changed.

    Okay, this is very helpful. Thanks. And I had tried to change my name the first time you suggested I do so, Ben, but couldn't see how. I will now, though.
    Please click on the "CONTACT US" link at the bottom right-hand side of the forum and do so. Also, when asking questions, post the actual Stata output. Here, we have no clue what output you are referring to, but the commands themselves are helpful (See FAQ Advice #12 for tips on how to ask questions).


    margins r.sex , at(educ=(1(1)3)) asobserved

    The output in Stata includes a chi2 statistic and a p-value. My understanding is that this is asking Stata to test a linear restriction of model parameters, which can be done with, e.g., Wald or LR tests, both of which have associated test statistics that are chi-square distributed under the null of equality of the parameters. Which test is Stata doing here to generate the p-value?

    Consider a reproducible example:

    Code:
    webuse lbw, clear
    probit low i.smoke##i.race
    margins r.smoke , at(race=(1/3)) asobserved
    Res.:

    Code:
    . margins r.smoke , at(race=(1/3)) asobserved
    
    Contrasts of adjusted predictions               Number of obs     =        189
    Model VCE    : OIM
    
    Expression   : Pr(low), predict()
    
    1._at        : race            =           1
    
    2._at        : race            =           2
    
    3._at        : race            =           3
    
    ------------------------------------------------------------
                             |         df        chi2     P>chi2
    -------------------------+----------------------------------
                   smoke@_at |
    (smoker vs nonsmoker) 1  |          1       11.89     0.0006
    (smoker vs nonsmoker) 2  |          1        2.21     0.1373
    (smoker vs nonsmoker) 3  |          1        0.11     0.7346
                      Joint  |          3       14.21     0.0026
    ------------------------------------------------------------
    
    --------------------------------------------------------------------------
                             |            Delta-method
                             |   Contrast   Std. Err.     [95% Conf. Interval]
    -------------------------+------------------------------------------------
                   smoke@_at |
    (smoker vs nonsmoker) 1  |   .2744755   .0796084       .118446    .4305051
    (smoker vs nonsmoker) 2  |      .2875   .1934625     -.0916795    .6666795
    (smoker vs nonsmoker) 3  |   .0530303   .1564033     -.2535145    .3595751
    --------------------------------------------------------------------------
    These are just Wald tests which you can replicate using the test command. In blue, the test is whether the difference in the coefficients of black smokers and black nonsmokers is significantly different from zero. The joint test is a simultaneous test of whether the differences in the coefficients of each of the groups are different from zero (i.e. between smokers and nonsmokers within a group). Using test:


    Code:
    webuse lbw, clear
    probit low i.smoke##i.race
    margins i.smoke#i.race, post
    test 0.smoke#2.race= 1.smoke#2.race
    test (0.smoke#1.race= 1.smoke#1.race)  (0.smoke#2.race =1.smoke#2.race)  (0.smoke#3.race= 1.smoke#3.race)
    Res.:

    Code:
    . margins i.smoke#i.race, post
    
    Adjusted predictions                                       Number of obs = 189
    Model VCE: OIM
    
    Expression: Pr(low), predict()
    
    ----------------------------------------------------------------------------------
                     |            Delta-method
                     |     Margin   std. err.      z    P>|z|     [95% conf. interval]
    -----------------+----------------------------------------------------------------
          smoke#race |
    nonsmoker#white  |   .0909091   .0433392     2.10   0.036     .0059658    .1758524
    nonsmoker#black  |      .3125   .1158781     2.70   0.007     .0853831    .5396169
    nonsmoker#other  |   .3636364   .0648642     5.61   0.000     .2365049    .4907678
       smoker#white  |   .3653846   .0667773     5.47   0.000     .2345035    .4962657
       smoker#black  |         .6   .1549193     3.87   0.000     .2963637    .9036363
       smoker#other  |   .4166667   .1423188     2.93   0.003      .137727    .6956063
    ----------------------------------------------------------------------------------
    
    
    
    . test 0.smoke#2.race= 1.smoke#2.race
    
     ( 1)  0bn.smoke#2.race - 1.smoke#2.race = 0
    
               chi2(  1) =    2.21
             Prob > chi2 =    0.1373
    
    .
    . test (0.smoke#1.race= 1.smoke#1.race)  (0.smoke#2.race =1.smoke#2.race)  (0.smoke#3.race= 1.smoke#3.race)
    
     ( 1)  0bn.smoke#1bn.race - 1.smoke#1bn.race = 0
     ( 2)  0bn.smoke#2.race - 1.smoke#2.race = 0
     ( 3)  0bn.smoke#3.race - 1.smoke#3.race = 0
    
               chi2(  3) =   14.21
             Prob > chi2 =    0.0026
    Last edited by Andrew Musau; 05 Mar 2023, 04:51.

    Comment

    Working...
    X