Announcement

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

  • Compute HHI Index for panel data

    Hi all,

    I am writing my masters thesis on the effect of market competition on risk-taking behavior of banks. My main explanatory variable will be a measure of market concentration (HHI index or entropy).

    I am working with the Call Report data for US banks which is a panel data set that has all the banks in the US per year (2000 - 2020) and I would like to generate the HHI index per company per the respective year however I think my approach is wrong. I attempted to use the following code:

    entropyetc Assets, by(cert)

    "Assets" being all the assets under management and "Cert" representing the unique ID of each bank.

    When I run the code however the output says "nothing to do"

    I would appreciate any input on this!

    Viktor

  • #2
    The help for entropyetc (from SSC) says

    Optionally, results may be listed. Optionally, new variables may be generated containing results. Hence the syntax supports those who want a listing, but not new variables, and conversely.
    However, if you don't specify either possibility, then you've given the command nothing to do.

    There are some more fundamental misunderstandings that are a little harder to diagnose. The help also says

    entropyetc treats varname, which may be numeric or string, as a categorical variable, so that distinct values define distinct categories
    Assets doesn't sound to me like a categorical variable. Also, there is nothing in your command that will ensure results separately by year.

    I am guessing that you need something more like

    Code:
    entropyetc cert [w=Assets], by(year) gen(4=HHI)



    Comment


    • #3
      Thank you Nick for the quick help and explanation, the new code indeed yields what I was looking for.

      Comment

      Working...
      X