Announcement

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

  • Overlay Dot Charts

    Hello!

    I have a relatively simple question that I have searched the forum for but could use extra assistance with.

    I would like to overlay two dot charts. This is the basic code used to create these two charts. Variables 3 and 5 are both dummy variables. Is there a simple way to overlay these two charts?
    Thank you

    Code:
    graph dot (mean) v1 (mean) v2, over(v3) over(v4)
    ​​​​​​​graph dot (mean) v1 (mean) v2, over(v5) over(v4)

  • #2
    Data example please.

    Comment


    • #3
      It is data looking at candidate ideology. v1(dem_ideo) and v2(rep_ideo) are both continuous. The mean of v1 lends it to be negative and positive for v2.
      v3(amountdon_Idum) and v5(amountdon_PACdum) are both dummy variables with the same categories--one is related to individual donors and the other PAC donors. v4 is also a dummy variable (incumbent or challenger).

      Code:
      graph dot (mean) dem_ideo (mean) rep_ideo,  over(amountdon_Idum, gap(0)) over(incumb_dummy) legend(pos(5) ring(1) col(1) size(small)) bargap(-50)
      When charted separately, the means of my continuous variables end up being similar. It would be nice to examine the slight differences on one chart. Thank you for your assistance and patience as I am new!

      Comment


      • #4
        Sorry, but what we mean by data example is spelled out in 12.2 in https://www.statalist.org/forums/help#stata

        Comment

        Working...
        X