Announcement

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

  • GINI Index Calculator

    Dear All,

    I am writing to seek help for calculating the Gini Index for a given distribution. For example:
    Code:
    set obs 1000
    gen x = rnormal(0,1)
    Is there any easy way or ready command to calculate the Gini index for x?

    Thank you very much and I look forward to hearing from you!

    Merry Christmas!

    Long



  • #2
    Long may want to type -search gini-
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Which Gini index? There are several. Is the one you have in mind defined for negative values?

      Code:
       
      search gini 
      
      search inequality
      show numerous programs.

      Comment


      • #4
        Dear Nick and Carlo,

        Thank you for the responses! I just need a normal Gini Index calculator for income inequality (no negative value). Maybe my example is not a good one since the normal distribution generates many negative values. For example, the income distribution follows a log-normal distribution.

        I have looked at the search and there are so many gini related commands and I really have no ideas where to start my trial. Since I simply need a plain and normal gini index calculator, I am writing to see if there is any direct calculators that I can use.

        Thank you very much!

        Long

        Comment


        • #5
          I don't think "plain and normal" ties it down.

          You need to tell the forum whether you are working with one variable or several, one group or more, or whether you expect to type in numbers directly (which is what calculator implies to me, although I doubt it is what you want).

          Comment


          • #6
            - findit inequal7-
            might be a good start for you. They also reference other commands in the help file if you want other options.

            Comment


            • #7
              Thank you Giuditta!

              Comment


              • #8
                Again, I don't yet know anything in detail about your data. But ineqdeco (SJ/SSC) can be as simple or as versatile as most people would probably want.

                Comment


                • #9
                  Thank you Nick! Both ineqdeco and inequal7 generate the Gini Index I want. They both seem a good start for me to study Gini Index calculations further in Stata.

                  Comment

                  Working...
                  X