Announcement

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

  • Matching based on SIZE and Industry


    . dataex ID TIC SIZE PROT Industry_code LN_AUDFEE
    ----------------------- copy starting from the next line -----------------------
    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input long ID str5 TIC double SIZE byte(PROT Industry_code) double LN_AUDFEE
    1675149 "AA"      9.676461473957694 1 3 15.872450834297597
    1158114 "AAOI"   6.1459865865441525 0 3 14.049499089318646
     320193 "AAPL"   12.732326637573383 1 3  16.66092562785641
     930245 "AASP"   -4.268697949366879 0 7 10.491274217438248
    1069183 "AAXN"    6.578612118944737 1 3  14.00131769970961
    1144980 "ABG"     7.899301895335059 0 6 14.580978400103845
     907654 "ABIO"   1.9205923410710235 0 3 11.947949375319936
    1605331 "ABQQ"   1.5208252540774967 0 7 10.809727948556782
    1070494 "ACAD"    6.291943143684131 0 3  13.71596421829101
    1622996 "ACBM"    .3940670631557951 1 3 10.348974334993779
    1001463 "ACCA"  -.36096986822161325 0 3  10.75042820627549
     712034 "ACCO"    7.932505719051791 0 3 15.183386333560147
    1698991 "ACEL"    6.125704750966459 0 5 11.350406535472453
    1069308 "ACER"   3.9251958611383935 1 3 11.635143097694478
    1520697 "ACHC"    8.727859869254766 1 7 15.259819077781128
    1070336 "ACHN"   5.6271101918253805 1 3 13.129432333358215
    1651235 "ACIA"    6.400023198606101 1 3 14.222973668735111
     868857 "ACM"     9.594318342797532 0 7 16.056220247240233
    1467373 "ACN"    10.301924017501833 1 7 16.822232226317865
    1557746 "ACRS"    5.618827164330305 1 3  13.17115354157376
       2098 "ACU"     4.695714481531775 1 3  12.70076888736628
     786947 "ACUR"     .766397642299538 1 3 11.891286555386333
     796343 "ADBE"    9.839944908681455 1 7 15.736012052418026
    1515156 "ADES"    5.073071607141957 1 3 12.936033799212835
    1513525 "ADIL"   1.5473497201206787 0 3 11.894780707439258
    
      //SOME OBSERVATIONS DELETED FOR SPACE PURPOSES
    
       6176 "AP"      6.347597594247162 0 3 14.320024303672572
    end
    ------------------ copy up to and including the previous line ------------------

    Listed 100 out of 1730 observations
    Use the count() option to list more

    I am new to Stata and I would really appreciate some help here. I have some observations for companies that rotated their auditor partner and their corresponding variables (auditfees, size, etc) I have included a sample which I have omitted some control variables such as ROA, Leverage etc. What I want to do is match the companies that rotated (dummy=1) and those that did not (dummy=0) by industry and size. For size I want closest match (probably the difference shouldn't be more than 0.5)

    After matching I would like to produce a report showing the matched sample. Please let me know if I'm missing to include anything that might be helpful in answering the question.

    Thanks a lot

  • #2
    I like the user-written program -calipmatch- for purposes like this (-ssc describe calipmatch-). You don't say which variable in your example represents your "rotation" dummy variable, so in the example code that follows I picked PROT for illustration. Also, in the example you provided, not many companies have a match on size within 0.5, so I used 50 as the caliper width so as to create a reasonable number of matches. I don't know what sort of report you want, so I did not offer any suggestions for that.

    Code:
    ssc install calipmatch
    calipmatch, casevar(PROT) generate(pairid) maxmatches(1) ///
       exactmatch(Industry_code) calipermatch(SIZE) caliperwidth(50)
    Questions about matching are very common on StataList, and many other solutions are possible besides what I suggested, so searching the archives of StataList for postings on matching might be interesting to you.

    Comment


    • #3
      It is also possible to do the matching manually. If you sort by industry and size, you can then readily identify the next largest or smallest firm in the sample. While this seems like an incredible amount of work, it turns out you can do it relatively quickly.

      Comment


      • #4
        Thank you Mike and Phil, I will get back to you if I encounter any problems or if I need more assistance. Stay safe.

        Comment

        Working...
        X