Announcement

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

  • Error when using -addstat- option for -outreg2-

    Hello,

    I'm trying to use -outreg2- to export results after running -areg- with additional statistics (stored p-values using -local-). The two local values are "a1" and "a2", which I specified as below (didn't include the tests I ran to before each -local- command to save space):

    Code:
    local a1 = r(p)
    local a2 = r(p)
    Then, I ran this -outreg2- command, where I specified that I want to add the values of "a1" and "a2" at the end of my output, with new names for each item:

    Code:
    outreg2 using myfile, excel append dec(2) alpha(0.001, 0.01, 0.05, 0.10) symbol(***, **, *, +) addstat("year1 effect", `a1', "year2 effect, `a2') adec(4)
    But Stata returns "option addstat() not allowed." What am I missing here? I've also tried removing the double-quotes in the label name, but that didn't seem to work either. Would appreciate any insight!

  • #2
    I noticed a typo in the code (which I did not make in Stata)--what I DID use:

    Code:
     
     outreg2 using myfile, excel append dec(2) alpha(0.001, 0.01, 0.05, 0.10) symbol(***, **, *, +) addstat("year1 effect", `a1', "year2 effect", `a2') adec(4)

    Comment


    • #3
      need all the code

      Comment


      • #4
        Good evening, I am working with xtable and I would like to export the output with outreg2, maybe could you help me who the code work?, I tried but I do not know how to use outreg2 with matrix(r(xtable)), thanks in advance

        Comment

        Working...
        X