Announcement

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

  • Multiple variable names in one row

    Hello all,

    I run multiple regressions with mostly the same variable names, but still some different variable names here and there. After each regression I stored the output via est store Regression1, Regression2 etc. Typing outreg2 [Regression1 Regression2 Regression3] using Test.tex results in the following:
    Variable Name Regression1 Regression2 Regression3
    Var1 123 324 234
    Var2 122 233 225
    VarTest_YES 345 523
    VarTest_NO 223
    Now, I would like to display the output like this:
    Variable Name Regression1 Regression2 Regression3
    Var1 123 324 234
    Var2 122 233 225
    VarTest 223 345 523
    YES/NO NO YES YES
    I know I can add the last YES/NO row with addtext(YES/NO, NO, YES, YES). But I don't know how to set up multiple variable names into one row. Is there an easy way to move up the regression data within the same column?
    Thank you very much in advance for help.

  • #2
    I've found the solution to this problem. For anyone else having the same issue, I solved it the following way:
    esttab Regression1 Regression2 Regression3 using Test.tex, rename(VarTest_YES VarTest VarTest_NO VarTest). Apparently rename doesn't work with outreg2, but in my case using esttab is just fine. For renaming multiple variables the rename command is rename(oldvar1 newvar1 oldvar2 newvar2..). This can be quite confusing as in the helpfile it said something about rename group(..) and rename(oldvar1 newvar1 [oldvar2 newvar2]), but those solutions didn't quite work for me.
    Anyway, I hope I saved someone the hassle of figuring this one out. Have a nice day!

    Comment


    • #3
      As far as I can tell, outreg2 documentation doesn't even mention rename so don't be surprised that it doesn't do it.

      Comment

      Working...
      X