Announcement

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

  • The change of auditor code due to audit firm mergers treated as a continuation of the predecessor auditor

    I need to calculate the client relationship for each company with its auditor (au). In 1998, auditor 3 and auditor 7 merged (Price Waterhouse (7) prior to July 1, 1998 merger with Coopers & Lybrand (3)). However, the client relationship with auditor 3 must continue, so the client relationship for AMC ENTERTAINMENT INC -OLD must continue after 1998. The value of au must therefore remain 3 after 1998 instead of 7. However, ACME ELECTRIC CORP already has auditor 7 before 1998 and this must therefore remain 7.

    Please help me write a stata code that ensures that au == "3" if fyear >= 1998 & au == "7" ONLY when there has been a change in 1998 from au == 3 to au == 7. So for companies that had auditor 7 already before 1998 and kept it afterwards, should remain 7.

    Use the dataset below as example:
    input gvkey str10 datadate fyear str50 conm au
    001038 31mar1993 1992 "AMC ENTERTAINMENT INC -OLD" 3
    001038 31mar1994 1993 "AMC ENTERTAINMENT INC -OLD" 3
    001038 31mar1995 1994 "AMC ENTERTAINMENT INC -OLD" 3
    001038 31mar1996 1995 "AMC ENTERTAINMENT INC -OLD" 3
    001038 31mar1997 1996 "AMC ENTERTAINMENT INC -OLD" 3
    001038 31mar1998 1997 "AMC ENTERTAINMENT INC -OLD" 3
    001038 31mar1999 1998 "AMC ENTERTAINMENT INC -OLD" 7
    001038 31mar2000 1999 "AMC ENTERTAINMENT INC -OLD" 7
    001038 31mar2001 2000 "AMC ENTERTAINMENT INC -OLD" 7
    001038 31mar2002 2001 "AMC ENTERTAINMENT INC -OLD" 7
    001038 31mar2003 2002 "AMC ENTERTAINMENT INC -OLD" 7
    001038 31mar2004 2003 "AMC ENTERTAINMENT INC -OLD" 7
    001099 30jun1995 1995 "ACME ELECTRIC CORP" 7
    001099 30jun1996 1996 "ACME ELECTRIC CORP" 7
    001099 30jun1997 1997 "ACME ELECTRIC CORP" 7
    001099 30jun1998 1998 "ACME ELECTRIC CORP" 7
    001099 30jun1999 1999 "ACME ELECTRIC CORP" 7
    001099 30jun2000 2000 "ACME ELECTRIC CORP" 7

    I have this code so far: bysort gvkey (fyear): replace au = "3" if fyear >= 1998 & au == "7"
    But this changes the 7 to a 3 for ACME ELECTRIC CORP as well for example.

  • #2
    Perhaps this situation doesn't actually arise in the data, but what should be done if prior to 1988 a firm had auditing relationships with both 3 and 7 (presumably at different times)?

    Comment


    • #3
      We can assume this does not happen.

      Comment


      • #4
        The following code is what I have so far:
        bysort gvkey fyear: gen pwc = (au == "7" & fyear >= 1998) | (au == "3" & fyear < 1998)
        bysort gvkey (fyear): replace au = "3" if pwc

        However, this also changes the 7 to a 3 for ACME ELECTRIC CORP as well for example.

        Comment


        • #5
          Just to be on the safe side, this code includes verification that use of both 3 and 7 as auditors before 1998 never actually occurs. If that assumption fails, the code will terminate with an error message before making the update. In that case, if your assumption about nobody using both 3 and 7 before 1998 is true in real life, it means you have a data error that needs fixing. If that assumption is false in real life, well, then we need different code to do the udating after 1998, and an explanation of how that is to be done.

          Code:
          by gvkey (fyear), sort: egen pre_1998_3 = max(cond(fyear < 1998, au == 3, .))
          
          //    VERIFY THAT JOINT USE OF 3 AND 7 BEFORE 1998 NEVER OCCURRS
          by gvkey (fyear): egen pre_1998_7 = max(cond(fyear < 1998, au == 7, .))
          assert !(pre_1998_3 == 1 & pre_1998_7 == 1)
          
          //    UPDATE 7 -> 3 FROM 1998 ON IF USED 3 BEFORE
          replace au = 3 if fyear >= 1998 & au == 7 & pre_1998_3

          Comment

          Working...
          X