Announcement

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

  • boxplot trends

    The command
    -graph box y,over(x)
    makes a series of separately framed boxplots for each value of a categorical variable x. But what if x is an ordered variable like year. Then what you want is a single frame around a series of boxplots that go from left to right as year increases.

    Is there a command that can do that?

  • #2
    stripplot from SSC can do this.

    Comment


    • #3
      Thank you. Which option to stripplot will do this? I'm sorry but I don't see it in the help.

      Comment


      • #4
        There is a bunch of examples in the help based on combining box and over() options.

        If you gave a data example as we always request you'd be more likely to get code suggestions.

        Comment


        • #5
          Returning to this I am more mystified by #1. Consider

          Code:
          webuse grunfeld
          gen log_mvalue = log10(mvalue)
          graph box log_mvalue if inrange(year, 1935, 1944), over(year) scheme(s1color)

          Click image for larger version

Name:	boxplot_vh.png
Views:	1
Size:	24.1 KB
ID:	1458986

          I think you're confusing over() and by() somehow.

          Comment

          Working...
          X