Announcement

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

  • James Park
    started a topic "Split" histogram when one bin takes 99%

    "Split" histogram when one bin takes 99%

    I have a dataset that 99% of them has one value. But there are many other values which take so few proportion.

    This will be one example.

    Code:
    sysuse auto, clear
    gen var=1
    replace var=2 if _n==_N
    replace var=3 if _n==_N-1
    histogram var
    Then, histogram is not very informative. But graphic designers often make this largest stick smaller, and make other sticks relatively bigger, by omitting a certain range on Y axis. And the biggest stick will have ~~ sign in the middle indicating some range was cut off.

    We have seen this. But how can I make this in Stata?

  • James Park
    replied
    Thank you. This is a good article.

    Originally posted by Nick Cox View Post
    What you want is often called a scale break on which there is a FAQ.

    https://www.stata.com/support/faqs/g.../scale-breaks/

    Bottom line: Stata is not big on scale breaks.

    I would not even try a scale break here. I would just say 99% of the values are 42, or whatever, and here's a graph of the others. You are obscure on what your variable is, but my guess will be that none of your readers will be surprised at the fact or really want a mangled graph purporting to show it.

    Leave a comment:


  • Nick Cox
    replied
    What you want is often called a scale break on which there is a FAQ.

    https://www.stata.com/support/faqs/g.../scale-breaks/

    Bottom line: Stata is not big on scale breaks.

    I would not even try a scale break here. I would just say 99% of the values are 42, or whatever, and here's a graph of the others. You are obscure on what your variable is, but my guess will be that none of your readers will be surprised at the fact or really want a mangled graph purporting to show it.

    Leave a comment:

Working...
X