Announcement

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

  • Firm entry, exit; entry rate and exit rate

    I'd been 'battling' with something and I would like some help please.
    For my panel data, I would like to identify the year each firm (identified by 'company_id') first enters the database, and enter this year under a new variable to be created, called 'EntryYr'.
    Also to identify the last year of a firm's existence in the database and enter this year under a new variable to be created, called 'ExitYr', and then calculate its age for each year of existence (which would be 'year - EntryYr'). There will also be two new variables called 'Entry' and 'Exit' which will be '1' for each firm's entry year and exit year respectively, and '0' otherwise. The exit year will be the last year the firm existed in the database.
    There will then be calculation of firm entry rates and exit rates per year, for each industry (NAICS) in each geographical location known as a CSD.

    Entry rate in year t = ([number of new firms in CSD(i) and NAICS(j) in year t] / [number of existing firms in CSD(i) and NAICS(j) in year t-1]) x 100

    Exit rate in year t = ([number of firms that exited CSD(i) and NAICS(j) in year t] / [number of firms that ever existed in CSD(i) and NAICS(j) in year t]) x 100

    I know this would be quite involving and I would truly appreciate getting assistance.

    Thank you!

    Best,
    Kele

    year company_id CSD NAICS
    2000 12362 31113 112
    2001 12362 31113 112
    2001 12363 31113 113
    2002 12363 31113 113
    2003 12363 31113 113
    2000 12364 31114 114
    2001 12364 31114 114
    2002 12364 31114 114
    2004 12367 31115 112
    2005 12367 31115 112
    2006 12367 31115 112

  • #2
    As I understand your problem, you could just use
    Code:
    // To create entry year
    egen int entryYr = min(year), by(company_id)
    egen int exitYr = max(year), by(company_id)
    
    // to create dummies for entry and exit year
    gen byte entry = (year==entryYr)
    gen byte exit = (year==exitYr)
    
    // To get number of entries, exits per year
    tabstat entry exit , stats(sum count) by(year)
    should give you the desired information

    Comment


    • #3


      Thanks Barbro!

      I've coded the total entries and exits per year, per CSD, per NAICS (NAICS is the industry; CSD is a geographical location the firm is in).

      what I need now is to find entry rates and exit rates per year, per CSD, per NAICS. To get the entry rates, I need the code to divide the current year's total entries per CSD per NAICS by the previous year's total firms in that CSD and NAICS, that is ,

      Entry rate in year t = ([number of new firms in CSD(i) and NAICS(j) in year t] / [number of existing firms in CSD(i) and NAICS(j) in year t-1]) x 100



      For or the exit rate, it would just be to divide the current year's total exits per CSD per NAICS by the same year's total firms in that CSD and NAICS, that is ,

      Exit rate in year t = ([number of firms that exited CSD(i) and NAICS(j) in year t] / [number of firms that ever existed in CSD(i) and NAICS(j) in year t]) x 100


      If you can please assist, I would appreciate it.

      Thanks

      Kele

      Comment


      • #4
        OK, Kwele, now it seems like you have delegated thinking to me. You should be able to do the sums yourself.

        Comment


        • #5
          I tried also this code but it did not work for some firms which exit and reenter in different years.

          Comment

          Working...
          X