Announcement

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

  • How do i visualize the relationship between two ordinal variables ?

    Hi,
    I have trouble visualizing my ordinal variables.
    i hope to show the general relationship between my IV&DV in graph.

    My first IV is organized in strongly disagree(score 1) to strongly agree(score 10); and my DV is formed in strongly disagree(1) to strongly agree(5)
    and second IV is average of score by adding three variables and divided (Mean: 5.6, range 1-7) and DV is same; strongly disagree(1) to strongly agree(5)

    since i've tried various ways to make the best graph, i couldn't figure it out yet.

    Any suggestions?

    Thank you.


  • #2
    Parallel histograms should help. You don't give a data example (see FAQ Advice #12) but rep78 from the auto data is a 5-level ordinal variable.

    Code:
    sysuse auto, clear
    histogram mpg, by(rep78, col(1)) discrete frequency scheme(s1color) subtitle(, pos(9) bcolor(none)  place(e) nobox) yla(, ang(h))

    Comment


    • #3
      Nick's suggestion is a fine one. A different approach I've used in related work—when only 2 variables are of interest—is to use a twoway scatter graph with marker sizes proportional to joint frequencies. For example, try running something like this.

      Code:
      clear
       
      set seed 23
       
      set obs 100
       
      gen x=rpoisson(1)
      gen y=rpoisson(1)
       
      preserve
       
      contract y x
       
      scatter y x [fw=_freq], msize(*.5)
       
      restore

      Comment


      • #4
        See also https://www.statalist.org/forums/for...updated-on-ssc for various plots of ordinal response and ordinal predictor. (Here's a vote against the horrible terms or labels DV and IV.)

        Comment


        • #5
          Both histogram and scatter graph work well with my data and thanks again for your helpful link attached

          Comment

          Working...
          X