Announcement

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

  • How to obtain standrad errors from STATA's "mchange"?

    Hi all,

    I run the following:

    ologit x1 x2 x3

    and then

    mchange

    The mchange command produces "+SD" values that I'm interested in (please see below) . However, it does not indicate standard errors. How do I obtain standard errors?

    Thanks for all suggestions!




    oprobit: Changes in Pr(y) | Number of obs = 2127

    Expression: Pr(stage2), predict(outcome())

    | 0 1 2
    -------------+---------------------------------
    x1 |
    +1 | -0.015 0.013 0.003
    p-value | 0.028 0.026 0.047
    +SD | -0.022 0.018 0.004
    p-value | 0.029 0.028 0.051

    Marginal | -0.015 0.012 0.003
    p-value | 0.023 0.022 0.037
    x2 |
    +1 | 0.021 -0.018 -0.004
    p-value | 0.488 0.492 0.470
    +SD | 0.006 -0.005 -0.001
    p-value | 0.504 0.507 0.497

    Marginal | 0.022 -0.018 -0.004
    p-value | 0.511 0.512 0.508
    x3 |
    +1 | -0.000 0.000 0.000
    p-value | 0.784 0.783 0.784
    +SD | -0.002 0.002 0.000
    p-value | 0.784 0.784 0.786

    Marginal | -0.000 0.000 0.000
    p-value | 0.783 0.783 0.784


  • #2
    A couple of things.

    First, mchange is not an official Stata command. It is part of Long and Freese's spost13 package (-findit spost13_ado-). You should indicate where you got user-written programs from.

    Second, your output is very hard to read, plus you don't show the actual commands themselves. In the future use code tags. See pt. 12 of the FAQ.

    Finally, to answer your question: mchange has an -se- option, which gives the Standard error of the estimated change. It also has options for things like p-values and confidence intervals. See the help.

    If that doesn't answer your Qs, write back, showing your code and output.

    Hope this helps.
    -------------------------------------------
    Richard Williams, Notre Dame Dept of Sociology
    Stata Version: 17.0 MP (2 processor)

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

    Comment


    • #3
      Here is an example.

      Code:
      webuse mchange, clear
      logit diabetes age i.female i.black weight
      mchange, stats(all) dec(5)
      Code:
      . mchange, stats(all) dec(5)
      
      logit: Changes in Pr(y) | Number of obs = 10335
      
      Expression: Pr(diabetes), predict(pr)
      
                   |    Change    p-value         LL         UL    z-value    Std Err       From         To 
      -------------+----------------------------------------------------------------------------------------
      age          |                                                                                        
                +1 |   0.00276    0.00000    0.00237    0.00314   13.95345    0.00020    0.04828    0.05104 
               +SD |   0.07096    0.00000    0.05882    0.08311   11.45226    0.00620    0.04828    0.11924 
          Marginal |   0.00269    0.00000    0.00231    0.00306   14.16383    0.00019         .z         .z 
      female       |                                                                                        
            1 vs 0 |   0.01612    0.00017    0.00773    0.02452    3.76467    0.00428    0.04048    0.05661 
      black        |                                                                                        
            1 vs 0 |   0.03266    0.00006    0.01666    0.04867    3.99916    0.00817    0.04480    0.07747 
      weight       |                                                                                        
                +1 |   0.00105    0.00000    0.00078    0.00131    7.69814    0.00014    0.04828    0.04933 
               +SD |   0.01845    0.00000    0.01318    0.02373    6.86098    0.00269    0.04828    0.06674 
          Marginal |   0.00103    0.00000    0.00077    0.00130    7.76394    0.00013         .z         .z 
      
      Average predictions
      
                   |         0          1 
      -------------+----------------------
        Pr(y|base) |   0.95172    0.04828
      -------------------------------------------
      Richard Williams, Notre Dame Dept of Sociology
      Stata Version: 17.0 MP (2 processor)

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

      Comment


      • #4
        Dear Richard,

        Many thanks for your comments (I'll be much more clear in the future) and the suggestion. It worked very well.
        I have several models where I generate marginal effects using the "mchange" command. Do you know of any way of generating these results in a table (like the standard table for regression models)? I am doing this manually now, with three different tables since I have a trichotomous dependent variable. But for the ordered logit models I use the outreg2 command (developed by Row Wada and John Luke Gallup). I know that it's more practical to generate a graph, but this time I have too many variables in the model and want to show the marginal effects for all of them in three tables.

        Comment


        • #5
          This was a good thread; but I wonder: mchange doesn't work with weights. Can I run my mlogit model with weights and run mchange after?

          Comment


          • #6
            mchange is just a shell for margins. So, with a little more work you could probably do it with margins.
            -------------------------------------------
            Richard Williams, Notre Dame Dept of Sociology
            Stata Version: 17.0 MP (2 processor)

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

            Comment


            • #7
              Dear all, I have a ordered logit model with six categories for dependent variable.

              I estimated the model using the command ologit. I need to obtain the Marginal effects computed at the mean of all variables as an approximation of average marginal effects and their standar errors. I Know I can used the command mchange but I don` t know what exaclty is the difference between using: "mchange, atmeans" or just "mchange" after run my model.

              Moreover, my key question is to obtain standard errors for marginal effects. How can I get standard errors after run the command "mchange, atmeans"? I only can I obtain standard errors if I run just mchange, stats(all) after my model, but not using mchange, atmeans. I need obtain the Marginal effects computed at the mean of all variables (MEMs) and their corresponding standar errors.

              In the attachment you can see an example with my results.

              Thank you very much
              Attached Files

              Comment

              Working...
              X