Announcement

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

  • Exporting marginal effects using esttab

    Hi,

    I am trying to export marginal effects to word document using the code below

    Code:
    *** Wage vs Non-wage
    logit wage idp [pweight = pweight]
    eststo margin: margins, dydx(*)
    est sto m5
    logit wage idp female age poor i.hhh_edu [pweight = pweight]
    eststo margin: margins, dydx(*)
    est sto m6
    *esttab m5 m6 using "${gsdOutput}/Paper/emp_idp.rtf", replace
    However, the coeeficients rather than the marginal effects are the ones being exported. Is there anything am missing?

    Thanks in advance.

    Best,
    Stephen.

  • #2
    esttab is from Stata Journal, authored by Ben Jann (you are asked to explain). Your issue is that you do not include the -post- option in your margins command, so the margins and their VCE are not set as estimation results. esttab will pick out the stored estimates which will be the regression output.

    Code:
    eststo margin: margins, dydx(*) post

    Comment


    • #3
      Thanks Andrew. This is much appreciated.

      Comment

      Working...
      X