Announcement

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

  • Best way to get a nice table of margins?

    I need to create preferably a Word document that includes a margin plot and the predicted margins. What would be my best approach to translating the _predict and #_at columns in the document into their respective names and values? I am familiar with asdoc, esttab, docx to get whatever table I have out to another format, but I how to get the margins table itself reformatted. I presume I have to work with the e matrix somehow. I am hoping there is already something out there to handle this?

    Thanks in advance for your help.

    Bob

  • #2
    You didn't get a quick answer. You'll increase your chances of a useful answer by following the FAQ on asking questions - provide Stata code in code delimiters, readable Stata output and sample data using dataex.

    While the formats for statistical results are reasonably standardized, it is not clear what format you're looking for in the output of your margins. You can certainly use margins and then the r(table) matrix it produces. While you could figure a way to program this to give you a pretty table, I'd be included to use mat list r(table), and then copy the table (using copy table). You can then paste the table into excel or word and add the additional stuff there.

    Comment


    • #3
      You can also have margins post the results and then you could format them like you do the results from estimation commands using things like esttab.

      I also like the way the mtable command, part of spost13, formats results. You can pick the stats you want, add descriptive labels, give multiple results one line after another, etc. For examples using mtable, see

      https://www3.nd.edu/~rwilliam/stats3/Margins04.pdf

      https://www3.nd.edu/~rwilliam/stats3/Margins05.pdf
      -------------------------------------------
      Richard Williams, Notre Dame Dept of Sociology
      StataNow Version: 18.5 MP (2 processor)

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

      Comment


      • #4
        I added margins to asdocx. Here is a working example of creating a nested table of margins with asdocx. https://fintechprofessor.com/asdocx/...s-with-asdocx/
        The update is available in the beta version of asdocx, therefore, it can be installed with
        Code:
        asdocx_update, beta
        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