Announcement

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

  • Outreg2 specific tables - and not the last one per default

    Hi,

    We wunder if we can "outreg" results from a regression, where we "bysort" per country, and therefore get 32 tables (we have 32 countries). Can we "outreg" every one of the tables or some of them, and not just the last table per default?

    Many thanks in advanced.

    Our codes are:

    > bysort i: xtivreg2 dlogsigma KAPITALSKAT logsigma INF ÅBEN VALUTA YMIDDEL STAT INFSD ÅBENSD VALUTASD STATSD, fe robust

    > outreg2 using results if== (i=6), excel

  • #2
    Yes this can be done, but it is not so straightforward with outreg2 (from SSC). Here is an example:
    Code:
    estimates clear
    sysuse auto, clear
    levelsof foreign, local(levels)
    forval i = 1/`: word count `levels'' {
        reg price weight if foreign == `: word `i' of `levels''
        estimates store est`i'
    }
    
    outreg2 [est1] using table1, replace
    outreg2 [est2] using table2, replace
    Another way to do this is to use the estout (from SSC) package instead of outreg2, which is much simpler:
    Code:
    eststo clear
    sysuse auto, clear
    by foreign: eststo: reg price weight
    
    esttab est1
    esttab est2

    Comment


    • #3
      Hi Wouter,

      Thanks a lot! The "estout" is working just fine :D

      Comment

      Working...
      X