Announcement

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

  • histogram - changing bin width

    I currently have this histogram - which is the same as the one posted in the post here plotting ecdf graph - too many lines - Statalist

    (but without ecdf - as I can't find a solution to the problem)

    I was told by my senior that I need to make it more 'readable' the histogram

    I've tried using Freedman- Diaconis rule - which essentially creates the same bin width as stata's.
    width 12, 41 bins
    My max value is 498
    Min value is 1

    How can I make it more readable, perhaps each bar having a width of 10 ? So for the reader it may be easier to reading every 10....
    Unless you have any other ideas how to make it more readable??

    Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	39.0 KB
ID:	1725401

  • #2
    Among various possibilities to consider is to use logarithmic scale. I often prefer quantile plots in any case.

    Comment


    • #3
      Hm, I was hoping to keep it with whole numbers on the x axis rather than using a log scale - it’s easily interpreted for statisticians but not amongst medical staff. As are quantile plots.

      So no other ways to fix this ?
      Last edited by Tara Boyle; 29 Aug 2023, 13:04.

      Comment


      • #4
        At a guess you have about a hundred distinct values, which should mean that (xvarm is the variable name you used in your linked post; change to suit circumstances)

        Code:
        preserve 
        contract xvarm
        dataex, count(498) 
        restore
        will yield dataex output that you can show us. The 498 is pessimistic on my part given your indication that your values are integers.

        I am a geographer and think I understand quantile plots, so why doubt medical people on that?

        Comment

        Working...
        X