Announcement

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

  • Exporting <medeff> Results

    I have a question regarding the medeff command from SSC -- documentation is available at http://www.princeton.edu/~rhicks/pap...ationstata.pdf. There are two stages in this type of analysis and the command displays two regression tables. I would like to export both of these regression tables, but I'm having trouble accessing the first one. I'm think I'm looking for something like the <first> or <savefirst> option that's available when using ivreg2.

    Here's a simplified example looking at the impact of gross national product on life expectancy, mediated by the impact of access to safe water.

    Code:
    ssc install mediation // Contains medeff
    ssc install outreg2
    sysuse lifeexp, clear
    gen north_america = (region == 3)
    
    medeff (regress safewater gnppc north_america) (regress lexp safewater gnppc north_america), treat(gnppc) mediate(safewater) sims(50)
    
    outreg2 using "Table 1", excel label dec(3) replace
    In this example, outreg2 is only able to export the results of the second regression.

    If there is no way to get the first table using outreg2, I'm comfortable creating my own table from scratch using the returned matrices. However, when I look at the return values for the medeff command (using ereturn(list)), I do not see the the values from the first regression. Please let me know if I am missing something (I hope so!).

    I'm using Stata version 14.2 on Windows.

    Thanks for your help!
    Last edited by Brina Seidel; 02 May 2017, 13:48.

  • #2
    I am stuck with this problem now, did you find a solution? It will be great if anybody could help!

    Comment

    Working...
    X