Announcement

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

  • Outreg2 or alternative: how to obtain results of a series of univariate analyses in long format rather than wide

    Hi, first time posting here. This might be an obvious fix but I can't figure it out.

    I use outreg2 for the results of multivariate regressions which works wonderfully. I also have several long univariate tables to do and I can't figure out how to get the output I need. For each new analysis, outreg2 adds new columns rather than reporting the results vertically. I understand why it's happening but I don't know how to fix it. Is it possible? Below is a sample of the code I've been using and a snip of the output. I have about 50 variables per table, 8 tables, and full-sample and sex-stratified results so I would prefer to fix it rather than manually copy and paste each result.

    Thank you in advance!


    mlogit subemot b2.sex, rrr
    outreg2 using subemotunivar, replace excel sideway dec(2) eform noaster ci paren(ci)

    mlogit subemot i.SDQ, rrr
    outreg2 using subemotunivar, append excel sideway dec(2) eform noaster ci paren(ci)

    mlogit subemot i.subcon, rrr
    outreg2 using subemotunivar, append excel sideway dec(2) eform noaster ci paren(ci)

    mlogit subemot i.subpeer, rrr
    outreg2 using subemotunivar, append excel sideway dec(2) eform noaster ci paren(ci)

    mlogit subemot i.subhyp, rrr
    outreg2 using subemotunivar, append excel sideway dec(2) eform noaster ci paren(ci)

    Click image for larger version

Name:	Screenshot 2022-01-20 153545.png
Views:	1
Size:	28.3 KB
ID:	1645990



  • #2
    outreg2 is from SSC (FAQ Advice #12). As far as I know, the -append- option adds results horizontally and the command has no option to append vertically. You may want to switch to estout from SSC.

    Comment

    Working...
    X