Announcement

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

  • Margins command possible after teffects?

    Hello,
    I am using teffects with pomeans to estimate the potential outcome means of the treatment "elective":
    Code:
    teffects ipwra (died age female hospital, logit) (elective), pomeans
    I see this output:
    Code:
    ------------------------------------------------------------------------------
                 |               Robust
            died | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
    -------------+----------------------------------------------------------------
    POmeans      |
        elective |
              0  |   .0098819   .0008252    11.98   0.000     .0082646    .0114993
              1  |   .0024719   .0002165    11.42   0.000     .0020475    .0028963
    ------------------------------------------------------------------------------
    I would like to calculate the marginal treatment effect across age. However, the margins post-estimation command does not work after teffects. I was wondering if anyone had any solutions for a workaround?
    If I was using a logistic regression, I would do this:
    Code:
    logistic died elective age female hospital, base
    margins, by(age elective)
    However, I can't find a translation to teffects. Thank you in advance for any ideas!

  • #2
    your question is not clear to me; however, the r.pdf manual, under the -margins- entry, shows how, in some circumstances, you can get the same results from -teffects- as you get from -margins-; so, go to the margins manual (type -help margins- and click on the link at the top of the page) and then search for -teffects- using command-F (MAC) or a similar search function if you use another OS

    Comment


    • #3
      Originally posted by Rich Goldstein View Post
      your question is not clear to me; however, the r.pdf manual, under the -margins- entry, shows how, in some circumstances, you can get the same results from -teffects- as you get from -margins-; so, go to the margins manual (type -help margins- and click on the link at the top of the page) and then search for -teffects- using command-F (MAC) or a similar search function if you use another OS
      Thank you- to clarify, using teffects I know we can compute the estimated average effect of a specific treatment. But I would like to consider the estimated effect of that treatment, across levels of another variable (i.e. age). Is there a way to do this using options within teffects?

      Comment

      Working...
      X