Announcement

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

  • Question about histogram

    Hi all,

    I have been trying to plot a variable and I'm not able to get the histogram look proper ( my histogram turning out to be very high and narrow). I have been trying with different start values, xlabels etc but not getting it to look right.

    The summary of the variable is:
    min: 100, max: 1.5e+08, mean: 208548,stddev: 267326, observations: 5000000

    I used the following options for the historgram:
    Code:
    histogram var,by(x) ytitle(%) percent xlabels (10000(10000)40000)
    I have been playing around with the numbers quite a bit but I continue to get extremely narrow and high histogram.

    Would appreciate any suggestion.

    Please let me know if you would like further information about the distribution.

    Best,

  • #2
    From what you're telling us the maximum value of your variable is about 150 million and so the x axis labels you're asking for extend only over about 30000 / 150 million or 0.02% of the range.

    Odds are that the only useful histogram will be one using log scale.

    See https://journals.sagepub.com/doi/pdf...867X1801800116 for detailed discussion.

    Comment


    • #3
      Thanks Nick, this is extremely useful for my case.

      Comment

      Working...
      X