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 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
    Code:
    sysuse auto
    qui regress price i.foreign##i.rep78 if rep78 > 2
    margins {rep78 1 -1 0}@0.foreign {rep78 1 0 -1}@0.foreign
    ---------------------------------
    Maarten L. Buis
    University of Konstanz
    Department of history and sociology
    box 40
    78457 Konstanz
    Germany
    http://www.maartenbuis.nl
    ---------------------------------

    Comment


    • #3
      Maarten Buis where in the documentation can we find discussion of these ways of specifying marginlists?

      Comment


      • #4
        help contrast
        ---------------------------------
        Maarten L. Buis
        University of Konstanz
        Department of history and sociology
        box 40
        78457 Konstanz
        Germany
        http://www.maartenbuis.nl
        ---------------------------------

        Comment


        • #5
          Maarten Buis : Thank you very much
          Kind regards

          nhb

          Comment

          Working...
          X