Announcement

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

  • Exporting regression on MacOS

    Dear all,

    I have written the following code:
    reghdfe lbiw markupsw , absorb(vat year) vce(cluster vat)
    estimates store Model1
    reghdfe lbiw markupsw capitalintensity , absorb(vat year) vce(cluster vat)
    estimates store model2
    reghdfe lbiw markupsw capitalintensity turnoverw , absorb(vat year) vce(cluster vat)
    estimates store model3

    and I would now like to export the three models in 1 table to word. However I get "shellout using `"/Users/.../downloads/Doc16.doc"'
    shellout probably will not work with MacOSX, when using outreg2. Is there any way to get a neat table and fix this issue?

    Many thanks in advance!

  • #2
    If you have access to the collect suite of commands, you could try something like this:

    Code:
    collect clear
    clear
    
    webuse nlswork
    
    collect create reghdfetable
    collect _r_b _r_se, tag(model[(1)]): reghdfe ln_w grade age ttl_exp tenure not_smsa south , absorb(idcode year)
    collect _r_b _r_se, tag(model[(2)]): reghdfe ln_w grade age ttl_exp tenure not_smsa south , absorb(idcode year occ)
    
    collect layout (colname#result) (model)
    
    collect style cell, nformat(%5.3f)
    collect style cell border_block, border(right, pattern(nil))
    collect style showbase off
    collect style header result, level(hide)
    collect style column, extraspace(1)
    collect style cell result[_r_se], sformat("(%s)")
    
    collect export reghdfe.docx
    Between the lines of the above code, you can use to see the command
    Code:
    collect preview
    to see the changes made by each line.

    Comment

    Working...
    X