Announcement

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

  • URGENT: Help with Outreg2 and mfx

    I am having difficulty including in Outreg2 the mfx result of my Logit model. How to export to excel the value of "y = Pr (var1) (predict)"? because I can only export the marginal values for each variable, but not the result of the whole estimation.

    Example:

    sysuse auto, clear
    logit foreign mpg rep78 head
    mfx

    Marginal effects after logit
    y = Pr(foreign) (predict)
    = .19906994 < ------> How to export this value using Outreg2?
    Last edited by Rafael Souza; 30 Apr 2018, 21:16.

  • #2
    Welcome to the Stata Forum/ Statalist.

    Please read the FAQ. There you’ll find information about avoiding to write ‘urgent’ messages. By the way, the best strategy to entail a helpful and oftentimes fast reply is following the instructions about sharing data/command/output.

    That said, you may wish to take a look at the - post - option with - margins - command.
    Best regards,

    Marcos

    Comment


    • #3
      You can use asdoc for all types of Stata output. For your example, I assume that you want a detailed regression table and the results. Let me show how to do that with asdoc.

      Code:
      ssc install asdoc
      sysuse auto, clear
      asdoc logit foreign mpg rep78 head, replace 
      mfx
      
      asdoc, text(Pr = `e(Xmfx_y)') append
      Click image for larger version

Name:	asdoc.png
Views:	1
Size:	33.5 KB
ID:	1442536

      And if you want nested regression tables, then you can use the option nest

      Code:
      sysuse auto, clear
      asdoc logit foreign mpg rep78 head, replace nest
      mfx
      
      asdoc, text(Pr = `e(Xmfx_y)') append
      Click image for larger version

Name:	asdoc nested.png
Views:	1
Size:	19.6 KB
ID:	1442537
      Regards
      --------------------------------------------------
      Attaullah Shah, PhD.
      Professor of Finance, Institute of Management Sciences Peshawar, Pakistan
      FinTechProfessor.com
      https://asdocx.com
      Check out my asdoc program, which sends outputs to MS Word.
      For more flexibility, consider using asdocx which can send Stata outputs to MS Word, Excel, LaTeX, or HTML.

      Comment

      Working...
      X