Announcement

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

  • Esttab transpose - several models

    Hi all,

    I would like to repeat three different regressions for various outcome variables. I would like to show the results in one big table. It should look like this:

    Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	13.3 KB
ID:	1709533


    Right now I use:

    Code:
    local varlist "outcome1 outcome2 ..."
    foreach x of local varlist{
    eststo m`x' : reg `x' dummy, robust 
    }
    esttab using r, p keep(dummy) replace 
    mat list r(coefs) 
    mat rename r(coefs) Model1
    esttab matrix(Model1, transpose) using filename.tex, replace
    This gives methe column Model 1. How do I append Model 2 and 3?

    Repeating the code
    Code:
    foreach x of local varlist{
    eststo m`x' : reg `x' dummy i.year, robust 
    }
    esttab using r, p keep(dummy) replace 
    mat list r(coefs) 
    mat rename r(coefs) Model2
    esttab matrix(Model2, transpose) using filename.tex, append
    and using "append" does not only append the results from Model 2 but also the first column (The Outcome names and "Control variables") once again. Does someone know how to fix this or a different way how to get the desired table?

    Thanks in advance,
    Kathrin

  • #2
    estout is from SSC, as you are asked to explain (FAQ Advice #12). Provide a reproducible example as recommended in the referenced FAQ Advice. This not only makes it easier on those willing to help but also helps those who will have a similar problem in the future.

    Comment


    • #3
      Hi Andrew Musau ,

      sorry for not providing a reproducible example. My dataset is confidential. For this specific question, I don't think it is super necessary to come up with a fake example. So if you or someone else has input on this, I would be very happy. If you disagree, I will do my best to come up with a fake example. But, of course, it would be great if I could save myself the trouble.

      It is correct that I am using estout from SSC in Stata 16.1

      Comment


      • #4
        As you note, the issue of confidential data is addressed in the FAQ Advice. My suggestions are only to increase your chances of getting a helpful reply, but what you choose to do is ultimately your call. As you state, that does not stop anyone else from responding to your query absent such a reproducible example.

        Comment

        Working...
        X