Announcement

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

  • How to get the negative effect using -margins-

    Dear all
    Running the code (To simplify the output I've chosen just to look at domestic cars in -margins-):
    Code:
    sysuse auto
    qui regress price i.foreign##i.rep78 if rep78 > 2
    margins [email protected]
    I get
    Code:
    --------------------------------------------------------------------
                       |            Delta-method
                       |   Contrast   std. err.     [95% conf. interval]
    -------------------+------------------------------------------------
         rep78@foreign |
    (4 vs 3) Domestic  |   -725.519   1136.593     -3005.235    1554.198
    (5 vs 3) Domestic  |  -2402.574   2164.008     -6743.024    1937.876
    --------------------------------------------------------------------
    However, I would like to get the effects 3 vs 4 and 3 vs 5 instead, i.e., the negatives of the above-estimated effects.
    I can of course use the command -lincom- twice to get the result, but can I use margins?
    Kind regards

    nhb

  • #2
    Duplicate post, for discussion see

    https://www.statalist.org/forums/for...-using-margins

    Comment


    • #3
      William Lisowski I tried without luck to find something about this before making this post. However, I think your link is wrong
      Kind regards

      nhb

      Comment

      Working...
      X