Announcement

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

  • Margins and Ologit2

    Hello, I am fitting a ologit2 model for an ordered outcome - HIVrisk (none, low and high). I am trying to generate predicted probabilities and a plot to explain a significant interaction term in the model. Here is my full syntax:

    Code:
    gologit2 selfhiv2 i.Sex_female i.ego_nonwhite AGE Edu i.knowAIDSy i.condomlessy ///
     i.hivriskothers_highmed i.multi_nsy prop_race_homo  SEXUAL_CONTACTS c.Edu#i.knowAIDSy, auto lrforce
    margins i.knowAIDSy, predict(outcome(1)) at(Edu=(-9.7(5)10.3)) atmeans
    margins i.knowAIDSy, predict(outcome(2)) at(Edu=(-9.7(5)10.3)) atmeans
    marginsplot, noci ytitle(Predicted Self-Perceived Risk) name(inteeduhowhiv)
    The interaction is between education and aidsknowledge (c.Edu#i.knowAIDSy). The marginsplot command produces this: inteeduhowhiv.pdf

    However, given that the DV is ordered, and there are multiple outcomes (none, low and high), with high being the excluded/reference category, which of the outcomes is the plot predicting ? How do we ensure the plot is indeed predicting none vs low & high, etc?

    thanks in advance for your assistance.

    best, cY

  • #2
    An additional detail: or alternatlvely, I tried repeating the marginsplot command, changing the predicted outcome categories, but this didn’t have the desired effect, and mainly repeated the same graph, thus, I would appreciate some thoughts on whether one plot or two is needed in the case of ordered outcome variables. Thanks in advance

    Comment


    • #3
      Hello: I am providing additional detail - data extract - to help with this question.

      Hopefully, that would help in getting some response to my question.

      thanks - cY


      ----------------------- copy starting from the next line -----------------------
      Code:
      * Example generated by -dataex-. To install: ssc install dataex
      clear
      input double(selfhiv2 Sex_female ego_nonwhite AGE Edu knowAIDSy) float condomlessy double(hivriskothers_highmed multi_nsy prop_race_homo SEXUAL_CONTACTS)
      1 1 0 24 12 0 1 1 1 .6666666666666666 601
      2 1 0 23 12 1 1 1 0 .8333333333333334   1
      0 0 1 72  5 0 1 0 0 .3333333333333333   1
      1 1 1 29 12 . 1 1 1                 0   3
      2 0 1 33 12 0 1 1 0              .125   3
      1 0 1 59 12 0 1 0 0              .125   4
      1 0 0 25 11 0 1 0 0                 1   0
      0 0 0 42 13 1 0 1 0 .8333333333333334   2
      1 1 0 26 14 1 1 1 1 .7692307692307693   4
      1 1 0 28 12 0 1 1 0 .5833333333333334   1
      end
      label values selfhiv2 high_low_none
      label def high_low_none 0 "none", modify
      label def high_low_none 1 "low", modify
      label def high_low_none 2 "high", modify
      ------------------ copy up to and including the previous line ------------------






      Comment


      • #4
        I was wondering what this ologit2 was (it is gologit2)!

        For adjusted predictions and marginal effects with multiple-outcome models (including gologit2) take a look at

        https://www3.nd.edu/~rwilliam/stats3/Margins05.pdf

        For possible graphing ideas, check out Nick Winter's combomarginsplot, available from SSC. See especially the example in the help file for Combining plots for multiple outcomes from one model.
        -------------------------------------------
        Richard Williams, Notre Dame Dept of Sociology
        StataNow Version: 19.5 MP (2 processor)

        EMAIL: [email protected]
        WWW: https://academicweb.nd.edu/~rwilliam/

        Comment


        • #5
          Thanks so much - the combomarginsplot command worked beautifully. best wishes - cY

          Comment

          Working...
          X