Announcement

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

  • mfx, predict(xbsel)

    dear all
    may I use mfx, predict(xbsel) command after heckman to get marginal effect?
    thank you

  • #2
    mfx is pretty old and superseded by margins. After heckman you can predict many different types of outcomes: e.g. the outcome including the non-selected case, the outcome conditional on being selected, the probability of being selected, and more. Consequently, you can also have many different marginal effects, one for each type of outcome. The type of outcome you used in your command is highly unusual, so probably not what you want. However that obviously depends on what it is exactly that you want with that model, which you did not tell us.
    ---------------------------------
    Maarten L. Buis
    University of Konstanz
    Department of history and sociology
    box 40
    78457 Konstanz
    Germany
    http://www.maartenbuis.nl
    ---------------------------------

    Comment


    • #3
      I hope to get selection model and outcome model marginal effect separately!!





      I used
      mfx compute, predict(ycond)
      and
      mfx compute, predict(psel)


      but mfx compute, predict(ycond) doesnt show standard error!
      thank you

      Comment


      • #4
        I may not have been clear: Use margins instead of mfx
        ---------------------------------
        Maarten L. Buis
        University of Konstanz
        Department of history and sociology
        box 40
        78457 Konstanz
        Germany
        http://www.maartenbuis.nl
        ---------------------------------

        Comment


        • #5
          what is the difference~?

          Comment


          • #6
            There are lots of subtle differences, so I could write a long post on that. However, it would cost me a lot of time to write and you a lot of time to sift through all that information to find the information you are looking for. So instead, why don't you tell me why you think mfx is better, so I can give you an answer that is relevant to you.
            ---------------------------------
            Maarten L. Buis
            University of Konstanz
            Department of history and sociology
            box 40
            78457 Konstanz
            Germany
            http://www.maartenbuis.nl
            ---------------------------------

            Comment


            • #7
              i tried it

              . margins,dydx(*) predict(ycond)
              predict option ycond not appropriate with margins

              but i got error~~

              Comment


              • #8
                It works for me:

                Code:
                webuse womenwk, clear
                heckman wage educ age, select(married children educ age)
                margins, dydx(*) predict(ycond)
                If I cannot reproduce the problem, it becomes very hard for me to diagnose the problem. Maybe you should directly discuss this with Stata's techsupport.
                ---------------------------------
                Maarten L. Buis
                University of Konstanz
                Department of history and sociology
                box 40
                78457 Konstanz
                Germany
                http://www.maartenbuis.nl
                ---------------------------------

                Comment


                • #9
                  Dear Joao,

                  I wonder why I cant get constant term when i use 'xtpoisson' command!

                  thank you

                  Comment

                  Working...
                  X