Announcement

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

  • Histogram: asking for suggestions in order to improve graph

    Hi everyone,

    I construct the graph that is enclosed, as an histogram.
    My question is the following:
    • Could anyone give me an advice in order to have this graph more readable please?
    I am not yet very proficient in stata, so advices and code tips are welcomed.
    Thank you very much.

    Best,

    Michael

  • #2
    Click image for larger version

Name:	Graph.jpg
Views:	1
Size:	21.1 KB
ID:	1726832

    The graph obtained.

    Comment


    • #3
      I would remove the smoother. Zipcodes as I understand it are not random, but I doubt that smoothed density functions tell you more than the histogram. You're using about 50 bins, in which case a table or annotated bar or dot chart identifying the most common rounded codes in order of frequency might be of interest too.

      Comment


      • #4
        Hi Nick Cox ,

        I missed you. It's great to see you answering me again.

        Thanks for the interesting suggestion.
        I'll see what I can do with these suggestions, and if I get stuck, I'll come back to this wonderful tool called statalist.

        Best,

        Michael

        Comment


        • #5
          Hi everyone,

          I am stuck. I obtained this ugly graph. Should anyone help me? I want to construct basically what Nick Cox says in #3.

          Here is a data example:


          Code:
          * Example generated by -dataex-. For more info, type help dataex
          clear
          input float id_numerical long sp_zipcode byte sp_zipcode_twodigits str5 tariff_ekon_id long(power_p1 power_p2 power_p3) float obs_by_zipcode
          468766 1001 1 "20TD"  3450 3450 . 333
          753801 1001 1 "20TD"  3450 3450 . 333
          868864 1001 1 "20DHA" 1000    . . 333
          538474 1001 1 "20TD"  3300 3300 . 333
          117736 1001 1 "20TD"  2800 2800 . 333
          end


          And here is my initial code:

          Code:
          scatter obs_by_zipcode sp_zipcode_twodigits [w=obs_by_zipcode], msymbol(circle_hollow)
          Best,

          Michael

          Comment


          • #6
            Here is the graph.
            Click image for larger version

Name:	Graph_nobs.png
Views:	1
Size:	59.8 KB
ID:	1726854

            Comment

            Working...
            X