Announcement

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

  • unreconnized command

    Hello!
    Please can anyone help me: I am using STATA 15 to run a Heckprobit, when I ask for mfx I get only marginal effects of the original selection. i still need marginal effects of my selection equation so i am trying to run one command of heckprobit post-estimation but none of them works and gives instead : unrecognized command! what should I do??

  • #2
    You will need to give us more details, with both exact code and Stata response for anyone to be able to answer that with some level of certainty.
    In general though, this could be because you have not installed the required ado files for the command. Check for this and try to find installation instructions with:
    Code:
    which somecommand
    findit somecommand
    Other than this, it could also just be you mistyped the command name or are using a certain option as command etc. And we would need to know what you typed before we can diagnose that.

    Comment


    • #3
      Also, you're referring to the mfx command, but I believe that post-estimation command is obsolete. The margins command is probably what you want anyway, and it will give you margins for the probability of selection, e.g.

      Code:
      use http://www.stata-press.com/data/r15/school
      quietly heckprobit private years logptax, select(vote=years loginc logptax)
      margins, dydx(*) predict(psel)
      Average marginal effects                        Number of obs     =         95
      Model VCE    : OIM
      
      Expression   : Pr(vote), predict(psel)
      dy/dx w.r.t. : years logptax loginc
      
      ------------------------------------------------------------------------------
                   |            Delta-method
                   |      dy/dx   Std. Err.      z    P>|z|     [95% Conf. Interval]
      -------------+----------------------------------------------------------------
             years |  -.0058649   .0050637    -1.16   0.247    -.0157896    .0040597
           logptax |  -.4477311   .1834564    -2.44   0.015    -.8072991   -.0881631
            loginc |   .3474277   .1427309     2.43   0.015     .0676802    .6271752
      ------------------------------------------------------------------------------
      If you omit the predict(psel) option, you'll get margins for the probability of the outcome (specifically, the marginal probability of success).
      Be aware that it can be very hard to answer a question without sample data. You can use the dataex command for this. Type help dataex at the command line.

      When presenting code or results, please use the code delimiters format them. Use the # button on the formatting toolbar, between the " (double quote) and <> buttons.

      Comment


      • #4
        Thank you for your feedback. And yes, the command is obsolete and I ended by using the command margins. Thanks again!

        Comment

        Working...
        X