SPSS Statistics

SPSS Statistics

Your hub for statistical analysis, data management, and data documentation. Connect, learn, and share with your peers! 

 View Only
  • 1.  Herfindahl–Hirschman index

    Posted Tue December 27, 2022 09:36 AM
    Hello,

    I am trying to calculate the Herfindahl-Hirschman Index for a project I am working on. I'm sure that I could figure out how to do the background calculation myself, but I was hoping that one of you may know of a way to do this in SPSS. Any help would be appreciated!



    ------------------------------
    Dane Thompson
    ------------------------------

    #SPSSStatistics


  • 2.  RE: Herfindahl–Hirschman index

    Posted Tue January 03, 2023 05:06 PM
    Hi. *If my source is correct that HHI is calculated by squaring the market shares of all firms in a market and then summing the squares, then you can create that variable in syntax:

    *Create some test data.

    dataset close all.
    new file.

    data list free / ms1 to ms4 (4F2).
    begin data.
    40 30 20 10
    20 60 10 10
    25 25 25 25
    end data.

    * Calculate HHI.

    vector ms=ms1 to ms4.

    loop #i=1 to 4.
    compute hhi=hhi+ms(#i)**2.
    leave hhi.
    end loop.

    list.

    ------------------------------
    Rick Marcantonio
    Quality Assurance
    IBM
    ------------------------------