Announcement

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

  • Putpdf table after esttab or estout

    Hi everyone! It appears that putpdf table cannot be used after esttab or estout, but only after estimates table. Is this true?

  • #2
    See the collect command in Stata 17 for creating custom tables which can be added to a PDF document using putpdf collect. estout is from SSC (FAQ Advice #12). To your question, putpdf being an official command is not designed to work with third party commands, but you could import the estout table as a dataset and have putpdf pick it from there. Whether the formatting is acceptable is your call.

    Code:
    sysuse auto, clear
    regress mpg weight disp i.rep78
    esttab using myfile.csv, replace nobase nocons
    import delimited myfile.csv, clear
    foreach var of varlist *{
        replace `var'= ustrregexra(`var', `"[="]"', "")
    }
    putpdf begin        
    putpdf  table mytable = data(*)
    putpdf save myfile, replace

    Comment


    • #3
      Thanks for the reply Andrew Musau! However, I was more referring to using esttab or estout and then putpdf table immediately using etable

      So like this:

      Code:
      sysuse auto, clear
      regress mpg weight
      estimates store reg1
      esttab reg1
      putpdf begin
      putpdf table regtable = etable
      This doesn't seem to work. It gives an error "information for the estimation table not found; Please replay estimation results and try again".

      If I replace esttab with estout, it gives the same error. However, the same code with estimates table does work.

      Code:
      sysuse auto, clear
      regress mpg weight
      estimates store reg1
      estimates table reg1
      putpdf clear
      putpdf begin
      putpdf table regtable = etable
      Does this mean that putpdf does not support these commands or are some adjustments necessary?
      Last edited by Deni Mazrekaj; 02 Feb 2022, 09:50.

      Comment


      • #4
        The best you can do is #2 AFAIK.

        Comment

        Working...
        X