Announcement

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

  • missing boxes in boxplot graph

    I'm trying to create a boxplot comparing a variable across two categories (see below for descriptive statistics). For one category the box shows up as expected, but for the other I see nothing. I am able to see the outsider values, but no media or intervals. When I add the option "nooutside", one of the categories is completely blank. What could be happening here?

    Just for info sake, here are the distributions of the variable by each category:
    . sum totspendSB_postJan if boycottintent==0

    Variable Obs Mean Std. Dev. Min Max

    to~B_postJan 945 7.714138 27.84039 0 414.91

    . sum totspendSB_postJan if boycottintent==1

    Variable Obs Mean Std. Dev. Min Max

    to~B_postJan 121 6.295454 19.66838 0 130.24


  • #2
    missing boxplot.tifhere's a picture of the graph with the missing box

    Comment


    • #3
      Please do read FAQ Advice #12 on posting .png (not .tif) and on showing the graph command in question.

      Here there's an easy guess. So many values are 0 that it's the minimum -- and the lower quartile -- and possibly the median too.

      For such data bare box plots don't work well. I suggest quantile plots or spikeplots instead.

      Check the results of

      Code:
      count if totspendSB_postJan == 0 & boycottintent==0
      
      count if totspendSB_postJan == 0 & boycottintent==1
      Alternatively, omit the zeros, report how many there are and show positive spending on a log scale.

      https://stats.stackexchange.com/ques...sing-a-whisker tells a similar story.
      Last edited by Nick Cox; 01 Dec 2017, 11:07.

      Comment

      Working...
      X