Announcement

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

  • Editing the default regression table notes generated by outreg2

    Hi all,

    I am using Stata 13 and I am trying to edit the notes that appear below the regression output tables generated with the outreg2 command. Here's a very quick example:

    Code:
    sysuse auto, clear
    reg price mpg trunk, cluster(foreign)
    outreg2 using table.xls, addnote(Clustered standard errors in parentheses) label replace
    However, this simply adds a line of text at the bottom of the table saying "Clustered standard errors in parentheses", while leaving the default generated "Robust standard errors in parentheses" in place. What I actually want is to have the "Clustered standard errors in parentheses" line replace the "Robust standard errors in parentheses" one. I tried the "nonotes" after outreg2, but that simply erases every note, including the one I am trying to insert.

    Thank you in advance.

  • #2
    You just need to add the - nonotes - option to omit the default note.

    Comment


    • #3
      Sorry, maybe I am misunderstanding something. When i add the - nonotes - option, as in the code below, I am unable to add any notes of my own, i.e., the - addnote - option does not add anything to the .xls file I am generating. Perhaps I am making a very dumb mistake or misunderstanding what you said, but I'd really appreciate your help i can get on this.

      Code:
      sysuse auto, clear
      reg price mpg trunk, cluster(foreign)
      outreg2 using table.xls, nonotes addnote(Clustered standard errors in parentheses) label replace

      Comment


      • #4
        The following example works for me:
        Code:
        sysuse auto, clear
        reg price  headroom length turn gear_ratio, cluster( rep78)
        outreg2 using table.xls, replace stats(coef  se) nonotes addnote(SE clustered by `e(clustvar)', *p<.05; **p<.01; ***p<.001)

        Comment


        • #5
          Thank you, your code works. For some odd reason, the one I posted still doesn't work properly, but I was able to get the formatting I wanted based on yours - thanks again!

          Comment


          • #6
            Sergio Pinto I agree, this is an odd thing, maybe a bug when choosing the Excel output. Somehow, the note option added to the table only with the stat option.

            Comment

            Working...
            X