Announcement

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

  • Gen variable industry density

    Hi all,

    hoping for some help here. For my thesis I want to create a variable that represents the industry density: the number of firms per year per industry. I am using panel data with random effects. The variables I am working with are industry (which is encode naics, gen(industry)), fyear (fiscal year), and separate firms within the panel data. I am hoping to get a variable called something along the lines of industry_density.

    Hope this is enough information to help!

    Tessa

  • #2
    Currently did it this way but I'm not quite sure if it gives me the hoped result:

    sort industry fyear
    by industry fyear: gen industry_density = _N

    Comment


    • #3
      That's a frequency. The definition of density is open. In physics, it is mass / volume; in demography or ecology, individuals / area; in geomorphology or hydrology it could be stream length per unit area. in traffic engineering vehicles per unit length of road. In probability even a probability mass function for a discrete variable is regarded as a kind of density by many probabilists who know measure theory.

      Yours is a density with tacit units per year.

      Comment


      • #4
        Hi Nick,

        thank you for your response! From what I understand, this is not a density but simply a frequency. Do you know a way to create this variable with a density? Writing a thesis in strategic management but using this density from population ecology literature.

        Look forward to your response!

        Comment


        • #5
          It's a frequency and a density with units count per year. No doubt there are different ways to measure density, such as firms per country area per year.

          Comment

          Working...
          X