Announcement

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

  • box plot

    Hi,

    I am trying to reorganize a box plot. I would like to graph multiple continuous variables, by sex. Currently, I can only figure out how to graph the different variables together, by sex (please see attached graph).

    But, I would like to display each variable separately, by sex. (For example, in the attached graph, I would like to first graph the "overall sri" by female/male, and then the "sense of peace" by female/male, all on the same graph. (Rather than all the female scores, then all the male scores)

    Is there a way to do this? Or can I only display the continuous variables together, by sex, as shown in the attachment?

    Please let me know if my question needs more clarification.
    Thanks!
    Robin

    PS my code for this graph: graph box sri_sum_bl_z sri_peace_bl_z , over (sex_bl)

    Click image for larger version

Name:	Graph.png
Views:	2
Size:	9.6 KB
ID:	1311715

    Attached Files

  • #2
    SJ-14-4 gr0062 . . . . . . . . . . . . Stata tip 121: Box plots side by side
    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . N. J. Cox
    Q4/14 SJ 14(4):991--996 (no commands)
    tip on how to and which data should be plotted side by
    side with box plots

    Comment


    • #3
      Not the question, but box plots look an indifferent choice here. For example, your right-hand box shows that at least 25% of values equal the maximum.

      dotplot or stripplot (SSC) would do a better job here of showing the fine structure including ties. In each case you can show median and quartiles too.

      Several threads here mentioning stripplot show some of the possibilities.

      Comment


      • #4
        Thanks Nick.

        Re: your first reply - is that just a reference to that particular Stata Journal article?

        Also, you're right that our data do clump together a lot at the maximums. I'll look into the other graph types you suggested.

        Comment


        • #5
          The article discusses the problem you raise.

          Comment


          • #6
            Ok, thanks - just wanted to be sure that's what the reference was for and that it wasn't shorthand for something else. I'll try to get access to the article!

            Comment

            Working...
            X