Announcement

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

  • Can not use -suest- for margins after probit or regress

    Dear Statalists,

    I am trying to estimate for several models (using -probit- or -regress-) and hope to be able to test whether marginal effects of those models are jointly significant.

    For this target, with my limited knowledge, I have hoped -suest- could be a solution. Specifically, I have started by running -margins- (after regression), saving marginal effects of each model with -estimates store-, then try to "combine" them with -suest-. However, the error "...estimated with a nonstandard vce (delta)" is always shown up as illustrated in the below example.
    Code:
    sysuse auto, clear
    
    probit foreign weight mpg
    margin, dydx(*) coeflegend post
    est store A
    
    reg weight mpg
    margin, dydx(*) coeflegend post
    est store B
    
    suest A B
    .A was estimated with a nonstandard vce (delta)
    From a previous post, it seems to me that the workable solution might be found at the option expression() of -margins- command. But I can not find down the proper expression for my situation, i.e for -probit- or -regress- as in the above example. Please kindly advise me. Thank you very much for for kind attention.


  • #2
    Code:
    sysuse auto, clear
    probit foreign weight mpg
    margins, dydx(weight mpg) expression(normal(xb()))  coefl post
    est store A
    reg weight mpg
    margins, dydx(mpg) expression(xb())  coefl post
    est sto B
    suest A B

    Edited: Sorry, I still get the same error despite the warning error not being accurate. I will get back to this later if no one else does.
    Last edited by Andrew Musau; 08 Aug 2019, 05:27.

    Comment


    • #3
      I have had the chance to look at the link that you reference and Jeff Pitblado (StataCorp)'s point is that if you want margins to output vce "Robust" estimates (as suest's output), you can use the -expression()- option as below.

      Code:
      sysuse auto, clear
      probit foreign weight mpg
      est sto A
      *default -margins, predict(pr)-  "not robust vce"
      margin, dydx(*) predict(pr)
      *Run suest (output's robust vce)
      suest A
      *use expression() option - "robust vce"
      margins, dydx(mpg) expression(normal(xb()))
      Code:
      . sysuse auto, clear
      (1978 Automobile Data)
      
      .
      . probit foreign weight mpg
      
      Iteration 0:   log likelihood =  -45.03321  
      Iteration 1:   log likelihood = -27.914626  
      Iteration 2:   log likelihood = -26.858074  
      Iteration 3:   log likelihood = -26.844197  
      Iteration 4:   log likelihood = -26.844189  
      Iteration 5:   log likelihood = -26.844189  
      
      Probit regression                               Number of obs     =         74
                                                      LR chi2(2)        =      36.38
                                                      Prob > chi2       =     0.0000
      Log likelihood = -26.844189                     Pseudo R2         =     0.4039
      
      ------------------------------------------------------------------------------
           foreign |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
      -------------+----------------------------------------------------------------
            weight |  -.0023355   .0005661    -4.13   0.000     -.003445   -.0012261
               mpg |  -.1039503   .0515689    -2.02   0.044    -.2050235   -.0028772
             _cons |   8.275464   2.554142     3.24   0.001     3.269437    13.28149
      ------------------------------------------------------------------------------
      
      .
      . est sto A
      
      .
      . *default -margins, predict(pr)-  "not robust vce"
      
      .
      . margin, dydx(*) predict(pr)
      
      Average marginal effects                        Number of obs     =         74
      Model VCE    : OIM
      
      Expression   : Pr(foreign), predict(pr)
      dy/dx w.r.t. : weight mpg
      
      ------------------------------------------------------------------------------
                   |            Delta-method
                   |      dy/dx   Std. Err.      z    P>|z|     [95% Conf. Interval]
      -------------+----------------------------------------------------------------
            weight |  -.0004649   .0000565    -8.23   0.000    -.0005756   -.0003542
               mpg |  -.0206923      .0092    -2.25   0.025    -.0387239   -.0026607
      ------------------------------------------------------------------------------
      
      .
      . *Run suest (output's robust vce)
      
      .
      . suest A
      
      Robust results for A
      
                                                      Number of obs     =         74
      
      ------------------------------------------------------------------------------
                   |               Robust
                   |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
      -------------+----------------------------------------------------------------
      foreign      |
            weight |  -.0023355   .0004934    -4.73   0.000    -.0033025   -.0013686
               mpg |  -.1039503   .0593548    -1.75   0.080    -.2202836    .0123829
             _cons |   8.275464   2.539177     3.26   0.001     3.298769    13.25216
      ------------------------------------------------------------------------------
      
      .
      . *use expression() option - "robust vce"
      
      .
      . margins, dydx(mpg) expression(normal(xb()))
      
      Average marginal effects                        Number of obs     =         74
      Model VCE    : Robust
      
      Expression   : normal(xb())
      dy/dx w.r.t. : mpg
      
      ------------------------------------------------------------------------------
                   |            Delta-method
                   |      dy/dx   Std. Err.      z    P>|z|     [95% Conf. Interval]
      -------------+----------------------------------------------------------------
               mpg |  -.0206923   .0113545    -1.82   0.068    -.0429467     .001562
      ------------------------------------------------------------------------------
      To your question, suest as the error message states does not allow nonstandard vce (e.g., robust). If you want to combine marginal effects from several linear regressions, there is no issue with this and suest since OLS coefficients are themselves marginal effects. For probit, margins with robust vce gives you the same results as those you would get from suest. It should be possible to combine several probit models estimated from the same sample. However, I do not know of a way or see the use of combining both probit and OLS estimates.

      Comment


      • #4
        Andrew Musau, please receive my appreciation for your marvelous guidance. For now, I would need a while to go deeper myself with this issue, just for clearly understanding what you give above. Then, I might annoying your help again for further instruction. Many thanks.

        Comment

        Working...
        X