Announcement

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

  • Publishable tables of regression results beside originals entered by hand

    Dear Readers

    I want to produce quite a number of tables which compare original regression results in a paper with the results I generate by various estimation commands "side by side". I cannot reproduce the original results so I must copy them from the paper by hand or by converting the table in the .pdf file of the paper to a spreadsheet.

    At the moment I manually copy the originals into a well known spreadsheet, and paste them into a

    Code:
    input variable o_var1 o_var2 ...
    rhs_var1  _beta _beta ...
    rhs_var1  _se _se ...
    rhs_var2  _beta _beta ...
    rhs_var2  _se _se
    ....
    end
    section of code

    I then construct a matrix in a loop for all the results I wish to display choosing first from these variables then from the estimates I make (estimates restore ...., and then choose the relevant estimation results), so that the resulting matrix alternates original and new estimates. Adding row and column names gives a matrix that can be "estout matrix()" or similar.

    Neither elegant, nor "automatic" even if I "putdocs" or "putexcel", all of which need subsequent editing.

    Can someone suggest a time efficient way to do this?

    Could I use the new "collect" command to do this in a nicer way?

    Thanks for your attention and suggestions.

    Richard


  • #2
    You can use the flexmat program that is part of the asdocx package (https://fintechprofessor.com/asdocx/). flexmat creates flexible matrices of text, numbers or both. Flexmat can add cells, rows, columns, or even previously stored matrices to the current matrix without worrying about comfortability or about mixing reals with string.
    If you find flexmat useful, then you can order asdocx that easily exports the flexmat table to Word or Excel.

    Code:
    net install flexmat, from(http://fintechprofessor.com) replace
    You might find the help file as a quick start to flexmat.
    Code:
    help flexmat
    Or this online page
    https://fintechprofessor.com/asdocx/...in-stata-mata/

    Or this YouTube video

    https://youtu.be/HzTlpMF4dZI
    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